diff --git a/lib/Api/AccountApi.php b/lib/Api/AccountApi.php index f5bdc6a2..f42a5688 100644 --- a/lib/Api/AccountApi.php +++ b/lib/Api/AccountApi.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -321,11 +321,6 @@ protected function getAccountRequest() if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { diff --git a/lib/Api/AttributesApi.php b/lib/Api/AttributesApi.php index 985883ed..783ec92f 100644 --- a/lib/Api/AttributesApi.php +++ b/lib/Api/AttributesApi.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -92,17 +92,17 @@ public function getConfig() * * Create contact attribute * - * @param string $attributeCategory Category of the attribute (required) - * @param string $attributeName Name of the attribute (required) - * @param \SendinBlue\Client\Model\CreateAttribute $createAttribute Values to create an attribute (required) + * @param string $attribute_category Category of the attribute (required) + * @param string $attribute_name Name of the attribute (required) + * @param \SendinBlue\Client\Model\CreateAttribute $create_attribute Values to create an attribute (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function createAttribute($attributeCategory, $attributeName, $createAttribute) + public function createAttribute($attribute_category, $attribute_name, $create_attribute) { - $this->createAttributeWithHttpInfo($attributeCategory, $attributeName, $createAttribute); + $this->createAttributeWithHttpInfo($attribute_category, $attribute_name, $create_attribute); } /** @@ -110,18 +110,18 @@ public function createAttribute($attributeCategory, $attributeName, $createAttri * * Create contact attribute * - * @param string $attributeCategory Category of the attribute (required) - * @param string $attributeName Name of the attribute (required) - * @param \SendinBlue\Client\Model\CreateAttribute $createAttribute Values to create an attribute (required) + * @param string $attribute_category Category of the attribute (required) + * @param string $attribute_name Name of the attribute (required) + * @param \SendinBlue\Client\Model\CreateAttribute $create_attribute Values to create an attribute (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function createAttributeWithHttpInfo($attributeCategory, $attributeName, $createAttribute) + public function createAttributeWithHttpInfo($attribute_category, $attribute_name, $create_attribute) { $returnType = ''; - $request = $this->createAttributeRequest($attributeCategory, $attributeName, $createAttribute); + $request = $this->createAttributeRequest($attribute_category, $attribute_name, $create_attribute); try { $options = $this->createHttpClientOption(); @@ -173,16 +173,16 @@ public function createAttributeWithHttpInfo($attributeCategory, $attributeName, * * Create contact attribute * - * @param string $attributeCategory Category of the attribute (required) - * @param string $attributeName Name of the attribute (required) - * @param \SendinBlue\Client\Model\CreateAttribute $createAttribute Values to create an attribute (required) + * @param string $attribute_category Category of the attribute (required) + * @param string $attribute_name Name of the attribute (required) + * @param \SendinBlue\Client\Model\CreateAttribute $create_attribute Values to create an attribute (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createAttributeAsync($attributeCategory, $attributeName, $createAttribute) + public function createAttributeAsync($attribute_category, $attribute_name, $create_attribute) { - return $this->createAttributeAsyncWithHttpInfo($attributeCategory, $attributeName, $createAttribute) + return $this->createAttributeAsyncWithHttpInfo($attribute_category, $attribute_name, $create_attribute) ->then( function ($response) { return $response[0]; @@ -195,17 +195,17 @@ function ($response) { * * Create contact attribute * - * @param string $attributeCategory Category of the attribute (required) - * @param string $attributeName Name of the attribute (required) - * @param \SendinBlue\Client\Model\CreateAttribute $createAttribute Values to create an attribute (required) + * @param string $attribute_category Category of the attribute (required) + * @param string $attribute_name Name of the attribute (required) + * @param \SendinBlue\Client\Model\CreateAttribute $create_attribute Values to create an attribute (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createAttributeAsyncWithHttpInfo($attributeCategory, $attributeName, $createAttribute) + public function createAttributeAsyncWithHttpInfo($attribute_category, $attribute_name, $create_attribute) { $returnType = ''; - $request = $this->createAttributeRequest($attributeCategory, $attributeName, $createAttribute); + $request = $this->createAttributeRequest($attribute_category, $attribute_name, $create_attribute); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -233,31 +233,31 @@ function ($exception) { /** * Create request for operation 'createAttribute' * - * @param string $attributeCategory Category of the attribute (required) - * @param string $attributeName Name of the attribute (required) - * @param \SendinBlue\Client\Model\CreateAttribute $createAttribute Values to create an attribute (required) + * @param string $attribute_category Category of the attribute (required) + * @param string $attribute_name Name of the attribute (required) + * @param \SendinBlue\Client\Model\CreateAttribute $create_attribute Values to create an attribute (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function createAttributeRequest($attributeCategory, $attributeName, $createAttribute) + protected function createAttributeRequest($attribute_category, $attribute_name, $create_attribute) { - // verify the required parameter 'attributeCategory' is set - if ($attributeCategory === null || (is_array($attributeCategory) && count($attributeCategory) === 0)) { + // verify the required parameter 'attribute_category' is set + if ($attribute_category === null || (is_array($attribute_category) && count($attribute_category) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $attributeCategory when calling createAttribute' + 'Missing the required parameter $attribute_category when calling createAttribute' ); } - // verify the required parameter 'attributeName' is set - if ($attributeName === null || (is_array($attributeName) && count($attributeName) === 0)) { + // verify the required parameter 'attribute_name' is set + if ($attribute_name === null || (is_array($attribute_name) && count($attribute_name) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $attributeName when calling createAttribute' + 'Missing the required parameter $attribute_name when calling createAttribute' ); } - // verify the required parameter 'createAttribute' is set - if ($createAttribute === null || (is_array($createAttribute) && count($createAttribute) === 0)) { + // verify the required parameter 'create_attribute' is set + if ($create_attribute === null || (is_array($create_attribute) && count($create_attribute) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $createAttribute when calling createAttribute' + 'Missing the required parameter $create_attribute when calling createAttribute' ); } @@ -270,26 +270,26 @@ protected function createAttributeRequest($attributeCategory, $attributeName, $c // path params - if ($attributeCategory !== null) { + if ($attribute_category !== null) { $resourcePath = str_replace( '{' . 'attributeCategory' . '}', - ObjectSerializer::toPathValue($attributeCategory), + ObjectSerializer::toPathValue($attribute_category), $resourcePath ); } // path params - if ($attributeName !== null) { + if ($attribute_name !== null) { $resourcePath = str_replace( '{' . 'attributeName' . '}', - ObjectSerializer::toPathValue($attributeName), + ObjectSerializer::toPathValue($attribute_name), $resourcePath ); } // body params $_tempBody = null; - if (isset($createAttribute)) { - $_tempBody = $createAttribute; + if (isset($create_attribute)) { + $_tempBody = $create_attribute; } if ($multipart) { @@ -344,11 +344,6 @@ protected function createAttributeRequest($attributeCategory, $attributeName, $c if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -375,16 +370,16 @@ protected function createAttributeRequest($attributeCategory, $attributeName, $c * * Delete an attribute * - * @param string $attributeCategory Category of the attribute (required) - * @param string $attributeName Name of the existing attribute (required) + * @param string $attribute_category Category of the attribute (required) + * @param string $attribute_name Name of the existing attribute (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function deleteAttribute($attributeCategory, $attributeName) + public function deleteAttribute($attribute_category, $attribute_name) { - $this->deleteAttributeWithHttpInfo($attributeCategory, $attributeName); + $this->deleteAttributeWithHttpInfo($attribute_category, $attribute_name); } /** @@ -392,17 +387,17 @@ public function deleteAttribute($attributeCategory, $attributeName) * * Delete an attribute * - * @param string $attributeCategory Category of the attribute (required) - * @param string $attributeName Name of the existing attribute (required) + * @param string $attribute_category Category of the attribute (required) + * @param string $attribute_name Name of the existing attribute (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteAttributeWithHttpInfo($attributeCategory, $attributeName) + public function deleteAttributeWithHttpInfo($attribute_category, $attribute_name) { $returnType = ''; - $request = $this->deleteAttributeRequest($attributeCategory, $attributeName); + $request = $this->deleteAttributeRequest($attribute_category, $attribute_name); try { $options = $this->createHttpClientOption(); @@ -436,7 +431,7 @@ public function deleteAttributeWithHttpInfo($attributeCategory, $attributeName) } catch (ApiException $e) { switch ($e->getCode()) { - case 400: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -444,7 +439,7 @@ public function deleteAttributeWithHttpInfo($attributeCategory, $attributeName) ); $e->setResponseObject($data); break; - case 404: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -462,15 +457,15 @@ public function deleteAttributeWithHttpInfo($attributeCategory, $attributeName) * * Delete an attribute * - * @param string $attributeCategory Category of the attribute (required) - * @param string $attributeName Name of the existing attribute (required) + * @param string $attribute_category Category of the attribute (required) + * @param string $attribute_name Name of the existing attribute (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteAttributeAsync($attributeCategory, $attributeName) + public function deleteAttributeAsync($attribute_category, $attribute_name) { - return $this->deleteAttributeAsyncWithHttpInfo($attributeCategory, $attributeName) + return $this->deleteAttributeAsyncWithHttpInfo($attribute_category, $attribute_name) ->then( function ($response) { return $response[0]; @@ -483,16 +478,16 @@ function ($response) { * * Delete an attribute * - * @param string $attributeCategory Category of the attribute (required) - * @param string $attributeName Name of the existing attribute (required) + * @param string $attribute_category Category of the attribute (required) + * @param string $attribute_name Name of the existing attribute (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteAttributeAsyncWithHttpInfo($attributeCategory, $attributeName) + public function deleteAttributeAsyncWithHttpInfo($attribute_category, $attribute_name) { $returnType = ''; - $request = $this->deleteAttributeRequest($attributeCategory, $attributeName); + $request = $this->deleteAttributeRequest($attribute_category, $attribute_name); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -520,24 +515,24 @@ function ($exception) { /** * Create request for operation 'deleteAttribute' * - * @param string $attributeCategory Category of the attribute (required) - * @param string $attributeName Name of the existing attribute (required) + * @param string $attribute_category Category of the attribute (required) + * @param string $attribute_name Name of the existing attribute (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function deleteAttributeRequest($attributeCategory, $attributeName) + protected function deleteAttributeRequest($attribute_category, $attribute_name) { - // verify the required parameter 'attributeCategory' is set - if ($attributeCategory === null || (is_array($attributeCategory) && count($attributeCategory) === 0)) { + // verify the required parameter 'attribute_category' is set + if ($attribute_category === null || (is_array($attribute_category) && count($attribute_category) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $attributeCategory when calling deleteAttribute' + 'Missing the required parameter $attribute_category when calling deleteAttribute' ); } - // verify the required parameter 'attributeName' is set - if ($attributeName === null || (is_array($attributeName) && count($attributeName) === 0)) { + // verify the required parameter 'attribute_name' is set + if ($attribute_name === null || (is_array($attribute_name) && count($attribute_name) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $attributeName when calling deleteAttribute' + 'Missing the required parameter $attribute_name when calling deleteAttribute' ); } @@ -550,18 +545,18 @@ protected function deleteAttributeRequest($attributeCategory, $attributeName) // path params - if ($attributeCategory !== null) { + if ($attribute_category !== null) { $resourcePath = str_replace( '{' . 'attributeCategory' . '}', - ObjectSerializer::toPathValue($attributeCategory), + ObjectSerializer::toPathValue($attribute_category), $resourcePath ); } // path params - if ($attributeName !== null) { + if ($attribute_name !== null) { $resourcePath = str_replace( '{' . 'attributeName' . '}', - ObjectSerializer::toPathValue($attributeName), + ObjectSerializer::toPathValue($attribute_name), $resourcePath ); } @@ -621,11 +616,6 @@ protected function deleteAttributeRequest($attributeCategory, $attributeName) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -881,11 +871,6 @@ protected function getAttributesRequest() if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -912,17 +897,17 @@ protected function getAttributesRequest() * * Update contact attribute * - * @param string $attributeCategory Category of the attribute (required) - * @param string $attributeName Name of the existing attribute (required) - * @param \SendinBlue\Client\Model\UpdateAttribute $updateAttribute Values to update an attribute (required) + * @param string $attribute_category Category of the attribute (required) + * @param string $attribute_name Name of the existing attribute (required) + * @param \SendinBlue\Client\Model\UpdateAttribute $update_attribute Values to update an attribute (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function updateAttribute($attributeCategory, $attributeName, $updateAttribute) + public function updateAttribute($attribute_category, $attribute_name, $update_attribute) { - $this->updateAttributeWithHttpInfo($attributeCategory, $attributeName, $updateAttribute); + $this->updateAttributeWithHttpInfo($attribute_category, $attribute_name, $update_attribute); } /** @@ -930,18 +915,18 @@ public function updateAttribute($attributeCategory, $attributeName, $updateAttri * * Update contact attribute * - * @param string $attributeCategory Category of the attribute (required) - * @param string $attributeName Name of the existing attribute (required) - * @param \SendinBlue\Client\Model\UpdateAttribute $updateAttribute Values to update an attribute (required) + * @param string $attribute_category Category of the attribute (required) + * @param string $attribute_name Name of the existing attribute (required) + * @param \SendinBlue\Client\Model\UpdateAttribute $update_attribute Values to update an attribute (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function updateAttributeWithHttpInfo($attributeCategory, $attributeName, $updateAttribute) + public function updateAttributeWithHttpInfo($attribute_category, $attribute_name, $update_attribute) { $returnType = ''; - $request = $this->updateAttributeRequest($attributeCategory, $attributeName, $updateAttribute); + $request = $this->updateAttributeRequest($attribute_category, $attribute_name, $update_attribute); try { $options = $this->createHttpClientOption(); @@ -1001,16 +986,16 @@ public function updateAttributeWithHttpInfo($attributeCategory, $attributeName, * * Update contact attribute * - * @param string $attributeCategory Category of the attribute (required) - * @param string $attributeName Name of the existing attribute (required) - * @param \SendinBlue\Client\Model\UpdateAttribute $updateAttribute Values to update an attribute (required) + * @param string $attribute_category Category of the attribute (required) + * @param string $attribute_name Name of the existing attribute (required) + * @param \SendinBlue\Client\Model\UpdateAttribute $update_attribute Values to update an attribute (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateAttributeAsync($attributeCategory, $attributeName, $updateAttribute) + public function updateAttributeAsync($attribute_category, $attribute_name, $update_attribute) { - return $this->updateAttributeAsyncWithHttpInfo($attributeCategory, $attributeName, $updateAttribute) + return $this->updateAttributeAsyncWithHttpInfo($attribute_category, $attribute_name, $update_attribute) ->then( function ($response) { return $response[0]; @@ -1023,17 +1008,17 @@ function ($response) { * * Update contact attribute * - * @param string $attributeCategory Category of the attribute (required) - * @param string $attributeName Name of the existing attribute (required) - * @param \SendinBlue\Client\Model\UpdateAttribute $updateAttribute Values to update an attribute (required) + * @param string $attribute_category Category of the attribute (required) + * @param string $attribute_name Name of the existing attribute (required) + * @param \SendinBlue\Client\Model\UpdateAttribute $update_attribute Values to update an attribute (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateAttributeAsyncWithHttpInfo($attributeCategory, $attributeName, $updateAttribute) + public function updateAttributeAsyncWithHttpInfo($attribute_category, $attribute_name, $update_attribute) { $returnType = ''; - $request = $this->updateAttributeRequest($attributeCategory, $attributeName, $updateAttribute); + $request = $this->updateAttributeRequest($attribute_category, $attribute_name, $update_attribute); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1061,31 +1046,31 @@ function ($exception) { /** * Create request for operation 'updateAttribute' * - * @param string $attributeCategory Category of the attribute (required) - * @param string $attributeName Name of the existing attribute (required) - * @param \SendinBlue\Client\Model\UpdateAttribute $updateAttribute Values to update an attribute (required) + * @param string $attribute_category Category of the attribute (required) + * @param string $attribute_name Name of the existing attribute (required) + * @param \SendinBlue\Client\Model\UpdateAttribute $update_attribute Values to update an attribute (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function updateAttributeRequest($attributeCategory, $attributeName, $updateAttribute) + protected function updateAttributeRequest($attribute_category, $attribute_name, $update_attribute) { - // verify the required parameter 'attributeCategory' is set - if ($attributeCategory === null || (is_array($attributeCategory) && count($attributeCategory) === 0)) { + // verify the required parameter 'attribute_category' is set + if ($attribute_category === null || (is_array($attribute_category) && count($attribute_category) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $attributeCategory when calling updateAttribute' + 'Missing the required parameter $attribute_category when calling updateAttribute' ); } - // verify the required parameter 'attributeName' is set - if ($attributeName === null || (is_array($attributeName) && count($attributeName) === 0)) { + // verify the required parameter 'attribute_name' is set + if ($attribute_name === null || (is_array($attribute_name) && count($attribute_name) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $attributeName when calling updateAttribute' + 'Missing the required parameter $attribute_name when calling updateAttribute' ); } - // verify the required parameter 'updateAttribute' is set - if ($updateAttribute === null || (is_array($updateAttribute) && count($updateAttribute) === 0)) { + // verify the required parameter 'update_attribute' is set + if ($update_attribute === null || (is_array($update_attribute) && count($update_attribute) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $updateAttribute when calling updateAttribute' + 'Missing the required parameter $update_attribute when calling updateAttribute' ); } @@ -1098,26 +1083,26 @@ protected function updateAttributeRequest($attributeCategory, $attributeName, $u // path params - if ($attributeCategory !== null) { + if ($attribute_category !== null) { $resourcePath = str_replace( '{' . 'attributeCategory' . '}', - ObjectSerializer::toPathValue($attributeCategory), + ObjectSerializer::toPathValue($attribute_category), $resourcePath ); } // path params - if ($attributeName !== null) { + if ($attribute_name !== null) { $resourcePath = str_replace( '{' . 'attributeName' . '}', - ObjectSerializer::toPathValue($attributeName), + ObjectSerializer::toPathValue($attribute_name), $resourcePath ); } // body params $_tempBody = null; - if (isset($updateAttribute)) { - $_tempBody = $updateAttribute; + if (isset($update_attribute)) { + $_tempBody = $update_attribute; } if ($multipart) { @@ -1172,11 +1157,6 @@ protected function updateAttributeRequest($attributeCategory, $attributeName, $u if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { diff --git a/lib/Api/CRMApi.php b/lib/Api/CRMApi.php deleted file mode 100644 index 5640fa95..00000000 --- a/lib/Api/CRMApi.php +++ /dev/null @@ -1,3306 +0,0 @@ -client = $client ?: new Client(); - $this->config = $config ?: new Configuration(); - $this->headerSelector = $selector ?: new HeaderSelector(); - } - - /** - * @return Configuration - */ - public function getConfig() - { - return $this->config; - } - - /** - * Operation crmNotesGet - * - * Get all notes - * - * @param string $entity Filter by note entity type (optional) - * @param string $entityIds Filter by note entity IDs (optional) - * @param int $dateFrom dateFrom to date range filter type (timestamp in milliseconds) (optional) - * @param int $dateTo dateTo to date range filter type (timestamp in milliseconds) (optional) - * @param int $offset Index of the first document of the page (optional) - * @param int $limit Number of documents per page (optional, default to 50) - * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \SendinBlue\Client\Model\NoteList - */ - public function crmNotesGet($entity = null, $entityIds = null, $dateFrom = null, $dateTo = null, $offset = null, $limit = '50', $sort = null) - { - list($response) = $this->crmNotesGetWithHttpInfo($entity, $entityIds, $dateFrom, $dateTo, $offset, $limit, $sort); - return $response; - } - - /** - * Operation crmNotesGetWithHttpInfo - * - * Get all notes - * - * @param string $entity Filter by note entity type (optional) - * @param string $entityIds Filter by note entity IDs (optional) - * @param int $dateFrom dateFrom to date range filter type (timestamp in milliseconds) (optional) - * @param int $dateTo dateTo to date range filter type (timestamp in milliseconds) (optional) - * @param int $offset Index of the first document of the page (optional) - * @param int $limit Number of documents per page (optional, default to 50) - * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \SendinBlue\Client\Model\NoteList, HTTP status code, HTTP response headers (array of strings) - */ - public function crmNotesGetWithHttpInfo($entity = null, $entityIds = null, $dateFrom = null, $dateTo = null, $offset = null, $limit = '50', $sort = null) - { - $returnType = '\SendinBlue\Client\Model\NoteList'; - $request = $this->crmNotesGetRequest($entity, $entityIds, $dateFrom, $dateTo, $offset, $limit, $sort); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\NoteList', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\ErrorModel', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation crmNotesGetAsync - * - * Get all notes - * - * @param string $entity Filter by note entity type (optional) - * @param string $entityIds Filter by note entity IDs (optional) - * @param int $dateFrom dateFrom to date range filter type (timestamp in milliseconds) (optional) - * @param int $dateTo dateTo to date range filter type (timestamp in milliseconds) (optional) - * @param int $offset Index of the first document of the page (optional) - * @param int $limit Number of documents per page (optional, default to 50) - * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function crmNotesGetAsync($entity = null, $entityIds = null, $dateFrom = null, $dateTo = null, $offset = null, $limit = '50', $sort = null) - { - return $this->crmNotesGetAsyncWithHttpInfo($entity, $entityIds, $dateFrom, $dateTo, $offset, $limit, $sort) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation crmNotesGetAsyncWithHttpInfo - * - * Get all notes - * - * @param string $entity Filter by note entity type (optional) - * @param string $entityIds Filter by note entity IDs (optional) - * @param int $dateFrom dateFrom to date range filter type (timestamp in milliseconds) (optional) - * @param int $dateTo dateTo to date range filter type (timestamp in milliseconds) (optional) - * @param int $offset Index of the first document of the page (optional) - * @param int $limit Number of documents per page (optional, default to 50) - * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function crmNotesGetAsyncWithHttpInfo($entity = null, $entityIds = null, $dateFrom = null, $dateTo = null, $offset = null, $limit = '50', $sort = null) - { - $returnType = '\SendinBlue\Client\Model\NoteList'; - $request = $this->crmNotesGetRequest($entity, $entityIds, $dateFrom, $dateTo, $offset, $limit, $sort); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'crmNotesGet' - * - * @param string $entity Filter by note entity type (optional) - * @param string $entityIds Filter by note entity IDs (optional) - * @param int $dateFrom dateFrom to date range filter type (timestamp in milliseconds) (optional) - * @param int $dateTo dateTo to date range filter type (timestamp in milliseconds) (optional) - * @param int $offset Index of the first document of the page (optional) - * @param int $limit Number of documents per page (optional, default to 50) - * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function crmNotesGetRequest($entity = null, $entityIds = null, $dateFrom = null, $dateTo = null, $offset = null, $limit = '50', $sort = null) - { - - $resourcePath = '/crm/notes'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($entity !== null) { - $queryParams['entity'] = ObjectSerializer::toQueryValue($entity); - } - // query params - if ($entityIds !== null) { - $queryParams['entityIds'] = ObjectSerializer::toQueryValue($entityIds); - } - // query params - if ($dateFrom !== null) { - $queryParams['dateFrom'] = ObjectSerializer::toQueryValue($dateFrom); - } - // query params - if ($dateTo !== null) { - $queryParams['dateTo'] = ObjectSerializer::toQueryValue($dateTo); - } - // query params - if ($offset !== null) { - $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); - } - // query params - if ($limit !== null) { - $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); - } - // query params - if ($sort !== null) { - $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); - } - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - - if($headers['Content-Type'] === 'application/json') { - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass) { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - // array has no __toString(), so we should encode it manually - if(is_array($httpBody)) { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); - } - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('api-key'); - if ($apiKey !== null) { - $headers['api-key'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation crmNotesIdDelete - * - * Delete a note - * - * @param string $id Note ID to delete (required) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - */ - public function crmNotesIdDelete($id) - { - $this->crmNotesIdDeleteWithHttpInfo($id); - } - - /** - * Operation crmNotesIdDeleteWithHttpInfo - * - * Delete a note - * - * @param string $id Note ID to delete (required) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function crmNotesIdDeleteWithHttpInfo($id) - { - $returnType = ''; - $request = $this->crmNotesIdDeleteRequest($id); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\ErrorModel', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\ErrorModel', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation crmNotesIdDeleteAsync - * - * Delete a note - * - * @param string $id Note ID to delete (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function crmNotesIdDeleteAsync($id) - { - return $this->crmNotesIdDeleteAsyncWithHttpInfo($id) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation crmNotesIdDeleteAsyncWithHttpInfo - * - * Delete a note - * - * @param string $id Note ID to delete (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function crmNotesIdDeleteAsyncWithHttpInfo($id) - { - $returnType = ''; - $request = $this->crmNotesIdDeleteRequest($id); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'crmNotesIdDelete' - * - * @param string $id Note ID to delete (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function crmNotesIdDeleteRequest($id) - { - // verify the required parameter 'id' is set - if ($id === null || (is_array($id) && count($id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $id when calling crmNotesIdDelete' - ); - } - - $resourcePath = '/crm/notes/{id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($id !== null) { - $resourcePath = str_replace( - '{' . 'id' . '}', - ObjectSerializer::toPathValue($id), - $resourcePath - ); - } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - - if($headers['Content-Type'] === 'application/json') { - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass) { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - // array has no __toString(), so we should encode it manually - if(is_array($httpBody)) { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); - } - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('api-key'); - if ($apiKey !== null) { - $headers['api-key'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'DELETE', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation crmNotesIdGet - * - * Get a note - * - * @param string $id Note ID to get (required) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \SendinBlue\Client\Model\Note - */ - public function crmNotesIdGet($id) - { - list($response) = $this->crmNotesIdGetWithHttpInfo($id); - return $response; - } - - /** - * Operation crmNotesIdGetWithHttpInfo - * - * Get a note - * - * @param string $id Note ID to get (required) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \SendinBlue\Client\Model\Note, HTTP status code, HTTP response headers (array of strings) - */ - public function crmNotesIdGetWithHttpInfo($id) - { - $returnType = '\SendinBlue\Client\Model\Note'; - $request = $this->crmNotesIdGetRequest($id); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\Note', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\ErrorModel', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\ErrorModel', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation crmNotesIdGetAsync - * - * Get a note - * - * @param string $id Note ID to get (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function crmNotesIdGetAsync($id) - { - return $this->crmNotesIdGetAsyncWithHttpInfo($id) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation crmNotesIdGetAsyncWithHttpInfo - * - * Get a note - * - * @param string $id Note ID to get (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function crmNotesIdGetAsyncWithHttpInfo($id) - { - $returnType = '\SendinBlue\Client\Model\Note'; - $request = $this->crmNotesIdGetRequest($id); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'crmNotesIdGet' - * - * @param string $id Note ID to get (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function crmNotesIdGetRequest($id) - { - // verify the required parameter 'id' is set - if ($id === null || (is_array($id) && count($id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $id when calling crmNotesIdGet' - ); - } - - $resourcePath = '/crm/notes/{id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($id !== null) { - $resourcePath = str_replace( - '{' . 'id' . '}', - ObjectSerializer::toPathValue($id), - $resourcePath - ); - } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - - if($headers['Content-Type'] === 'application/json') { - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass) { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - // array has no __toString(), so we should encode it manually - if(is_array($httpBody)) { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); - } - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('api-key'); - if ($apiKey !== null) { - $headers['api-key'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation crmNotesIdPatch - * - * Update a note - * - * @param string $id Note ID to update (required) - * @param \SendinBlue\Client\Model\NoteData $body Note data to update a note (required) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - */ - public function crmNotesIdPatch($id, $body) - { - $this->crmNotesIdPatchWithHttpInfo($id, $body); - } - - /** - * Operation crmNotesIdPatchWithHttpInfo - * - * Update a note - * - * @param string $id Note ID to update (required) - * @param \SendinBlue\Client\Model\NoteData $body Note data to update a note (required) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function crmNotesIdPatchWithHttpInfo($id, $body) - { - $returnType = ''; - $request = $this->crmNotesIdPatchRequest($id, $body); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\ErrorModel', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\ErrorModel', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 415: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\ErrorModel', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation crmNotesIdPatchAsync - * - * Update a note - * - * @param string $id Note ID to update (required) - * @param \SendinBlue\Client\Model\NoteData $body Note data to update a note (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function crmNotesIdPatchAsync($id, $body) - { - return $this->crmNotesIdPatchAsyncWithHttpInfo($id, $body) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation crmNotesIdPatchAsyncWithHttpInfo - * - * Update a note - * - * @param string $id Note ID to update (required) - * @param \SendinBlue\Client\Model\NoteData $body Note data to update a note (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function crmNotesIdPatchAsyncWithHttpInfo($id, $body) - { - $returnType = ''; - $request = $this->crmNotesIdPatchRequest($id, $body); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'crmNotesIdPatch' - * - * @param string $id Note ID to update (required) - * @param \SendinBlue\Client\Model\NoteData $body Note data to update a note (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function crmNotesIdPatchRequest($id, $body) - { - // verify the required parameter 'id' is set - if ($id === null || (is_array($id) && count($id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $id when calling crmNotesIdPatch' - ); - } - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling crmNotesIdPatch' - ); - } - - $resourcePath = '/crm/notes/{id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($id !== null) { - $resourcePath = str_replace( - '{' . 'id' . '}', - ObjectSerializer::toPathValue($id), - $resourcePath - ); - } - - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - - if($headers['Content-Type'] === 'application/json') { - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass) { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - // array has no __toString(), so we should encode it manually - if(is_array($httpBody)) { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); - } - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('api-key'); - if ($apiKey !== null) { - $headers['api-key'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'PATCH', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation crmNotesPost - * - * Create a note - * - * @param \SendinBlue\Client\Model\NoteData $body Note data to create a note. (required) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \SendinBlue\Client\Model\NoteId - */ - public function crmNotesPost($body) - { - list($response) = $this->crmNotesPostWithHttpInfo($body); - return $response; - } - - /** - * Operation crmNotesPostWithHttpInfo - * - * Create a note - * - * @param \SendinBlue\Client\Model\NoteData $body Note data to create a note. (required) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \SendinBlue\Client\Model\NoteId, HTTP status code, HTTP response headers (array of strings) - */ - public function crmNotesPostWithHttpInfo($body) - { - $returnType = '\SendinBlue\Client\Model\NoteId'; - $request = $this->crmNotesPostRequest($body); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\NoteId', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\ErrorModel', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 415: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\ErrorModel', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation crmNotesPostAsync - * - * Create a note - * - * @param \SendinBlue\Client\Model\NoteData $body Note data to create a note. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function crmNotesPostAsync($body) - { - return $this->crmNotesPostAsyncWithHttpInfo($body) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation crmNotesPostAsyncWithHttpInfo - * - * Create a note - * - * @param \SendinBlue\Client\Model\NoteData $body Note data to create a note. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function crmNotesPostAsyncWithHttpInfo($body) - { - $returnType = '\SendinBlue\Client\Model\NoteId'; - $request = $this->crmNotesPostRequest($body); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'crmNotesPost' - * - * @param \SendinBlue\Client\Model\NoteData $body Note data to create a note. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function crmNotesPostRequest($body) - { - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling crmNotesPost' - ); - } - - $resourcePath = '/crm/notes'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - - if($headers['Content-Type'] === 'application/json') { - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass) { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - // array has no __toString(), so we should encode it manually - if(is_array($httpBody)) { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); - } - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('api-key'); - if ($apiKey !== null) { - $headers['api-key'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation crmTasksGet - * - * Get all tasks - * - * @param string $filterType Filter by task type (ID) (optional) - * @param string $filterStatus Filter by task status (optional) - * @param string $filterDate Filter by date (optional) - * @param string $filterAssignTo Filter by assignTo id (optional) - * @param string $filterContacts Filter by contact ids (optional) - * @param string $filterDeals Filter by deals ids (optional) - * @param string $filterCompanies Filter by companies ids (optional) - * @param int $dateFrom dateFrom to date range filter type (timestamp in milliseconds) (optional) - * @param int $dateTo dateTo to date range filter type (timestamp in milliseconds) (optional) - * @param int $offset Index of the first document of the page (optional) - * @param int $limit Number of documents per page (optional, default to 50) - * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) - * @param string $sortBy The field used to sort field names. (optional) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \SendinBlue\Client\Model\TaskList - */ - public function crmTasksGet($filterType = null, $filterStatus = null, $filterDate = null, $filterAssignTo = null, $filterContacts = null, $filterDeals = null, $filterCompanies = null, $dateFrom = null, $dateTo = null, $offset = null, $limit = '50', $sort = null, $sortBy = null) - { - list($response) = $this->crmTasksGetWithHttpInfo($filterType, $filterStatus, $filterDate, $filterAssignTo, $filterContacts, $filterDeals, $filterCompanies, $dateFrom, $dateTo, $offset, $limit, $sort, $sortBy); - return $response; - } - - /** - * Operation crmTasksGetWithHttpInfo - * - * Get all tasks - * - * @param string $filterType Filter by task type (ID) (optional) - * @param string $filterStatus Filter by task status (optional) - * @param string $filterDate Filter by date (optional) - * @param string $filterAssignTo Filter by assignTo id (optional) - * @param string $filterContacts Filter by contact ids (optional) - * @param string $filterDeals Filter by deals ids (optional) - * @param string $filterCompanies Filter by companies ids (optional) - * @param int $dateFrom dateFrom to date range filter type (timestamp in milliseconds) (optional) - * @param int $dateTo dateTo to date range filter type (timestamp in milliseconds) (optional) - * @param int $offset Index of the first document of the page (optional) - * @param int $limit Number of documents per page (optional, default to 50) - * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) - * @param string $sortBy The field used to sort field names. (optional) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \SendinBlue\Client\Model\TaskList, HTTP status code, HTTP response headers (array of strings) - */ - public function crmTasksGetWithHttpInfo($filterType = null, $filterStatus = null, $filterDate = null, $filterAssignTo = null, $filterContacts = null, $filterDeals = null, $filterCompanies = null, $dateFrom = null, $dateTo = null, $offset = null, $limit = '50', $sort = null, $sortBy = null) - { - $returnType = '\SendinBlue\Client\Model\TaskList'; - $request = $this->crmTasksGetRequest($filterType, $filterStatus, $filterDate, $filterAssignTo, $filterContacts, $filterDeals, $filterCompanies, $dateFrom, $dateTo, $offset, $limit, $sort, $sortBy); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\TaskList', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\ErrorModel', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation crmTasksGetAsync - * - * Get all tasks - * - * @param string $filterType Filter by task type (ID) (optional) - * @param string $filterStatus Filter by task status (optional) - * @param string $filterDate Filter by date (optional) - * @param string $filterAssignTo Filter by assignTo id (optional) - * @param string $filterContacts Filter by contact ids (optional) - * @param string $filterDeals Filter by deals ids (optional) - * @param string $filterCompanies Filter by companies ids (optional) - * @param int $dateFrom dateFrom to date range filter type (timestamp in milliseconds) (optional) - * @param int $dateTo dateTo to date range filter type (timestamp in milliseconds) (optional) - * @param int $offset Index of the first document of the page (optional) - * @param int $limit Number of documents per page (optional, default to 50) - * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) - * @param string $sortBy The field used to sort field names. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function crmTasksGetAsync($filterType = null, $filterStatus = null, $filterDate = null, $filterAssignTo = null, $filterContacts = null, $filterDeals = null, $filterCompanies = null, $dateFrom = null, $dateTo = null, $offset = null, $limit = '50', $sort = null, $sortBy = null) - { - return $this->crmTasksGetAsyncWithHttpInfo($filterType, $filterStatus, $filterDate, $filterAssignTo, $filterContacts, $filterDeals, $filterCompanies, $dateFrom, $dateTo, $offset, $limit, $sort, $sortBy) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation crmTasksGetAsyncWithHttpInfo - * - * Get all tasks - * - * @param string $filterType Filter by task type (ID) (optional) - * @param string $filterStatus Filter by task status (optional) - * @param string $filterDate Filter by date (optional) - * @param string $filterAssignTo Filter by assignTo id (optional) - * @param string $filterContacts Filter by contact ids (optional) - * @param string $filterDeals Filter by deals ids (optional) - * @param string $filterCompanies Filter by companies ids (optional) - * @param int $dateFrom dateFrom to date range filter type (timestamp in milliseconds) (optional) - * @param int $dateTo dateTo to date range filter type (timestamp in milliseconds) (optional) - * @param int $offset Index of the first document of the page (optional) - * @param int $limit Number of documents per page (optional, default to 50) - * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) - * @param string $sortBy The field used to sort field names. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function crmTasksGetAsyncWithHttpInfo($filterType = null, $filterStatus = null, $filterDate = null, $filterAssignTo = null, $filterContacts = null, $filterDeals = null, $filterCompanies = null, $dateFrom = null, $dateTo = null, $offset = null, $limit = '50', $sort = null, $sortBy = null) - { - $returnType = '\SendinBlue\Client\Model\TaskList'; - $request = $this->crmTasksGetRequest($filterType, $filterStatus, $filterDate, $filterAssignTo, $filterContacts, $filterDeals, $filterCompanies, $dateFrom, $dateTo, $offset, $limit, $sort, $sortBy); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'crmTasksGet' - * - * @param string $filterType Filter by task type (ID) (optional) - * @param string $filterStatus Filter by task status (optional) - * @param string $filterDate Filter by date (optional) - * @param string $filterAssignTo Filter by assignTo id (optional) - * @param string $filterContacts Filter by contact ids (optional) - * @param string $filterDeals Filter by deals ids (optional) - * @param string $filterCompanies Filter by companies ids (optional) - * @param int $dateFrom dateFrom to date range filter type (timestamp in milliseconds) (optional) - * @param int $dateTo dateTo to date range filter type (timestamp in milliseconds) (optional) - * @param int $offset Index of the first document of the page (optional) - * @param int $limit Number of documents per page (optional, default to 50) - * @param string $sort Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) - * @param string $sortBy The field used to sort field names. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function crmTasksGetRequest($filterType = null, $filterStatus = null, $filterDate = null, $filterAssignTo = null, $filterContacts = null, $filterDeals = null, $filterCompanies = null, $dateFrom = null, $dateTo = null, $offset = null, $limit = '50', $sort = null, $sortBy = null) - { - - $resourcePath = '/crm/tasks'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($filterType !== null) { - $queryParams['filter[type]'] = ObjectSerializer::toQueryValue($filterType); - } - // query params - if ($filterStatus !== null) { - $queryParams['filter[status]'] = ObjectSerializer::toQueryValue($filterStatus); - } - // query params - if ($filterDate !== null) { - $queryParams['filter[date]'] = ObjectSerializer::toQueryValue($filterDate); - } - // query params - if ($filterAssignTo !== null) { - $queryParams['filter[assignTo]'] = ObjectSerializer::toQueryValue($filterAssignTo); - } - // query params - if ($filterContacts !== null) { - $queryParams['filter[contacts]'] = ObjectSerializer::toQueryValue($filterContacts); - } - // query params - if ($filterDeals !== null) { - $queryParams['filter[deals]'] = ObjectSerializer::toQueryValue($filterDeals); - } - // query params - if ($filterCompanies !== null) { - $queryParams['filter[companies]'] = ObjectSerializer::toQueryValue($filterCompanies); - } - // query params - if ($dateFrom !== null) { - $queryParams['dateFrom'] = ObjectSerializer::toQueryValue($dateFrom); - } - // query params - if ($dateTo !== null) { - $queryParams['dateTo'] = ObjectSerializer::toQueryValue($dateTo); - } - // query params - if ($offset !== null) { - $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); - } - // query params - if ($limit !== null) { - $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); - } - // query params - if ($sort !== null) { - $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); - } - // query params - if ($sortBy !== null) { - $queryParams['sortBy'] = ObjectSerializer::toQueryValue($sortBy); - } - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - - if($headers['Content-Type'] === 'application/json') { - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass) { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - // array has no __toString(), so we should encode it manually - if(is_array($httpBody)) { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); - } - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('api-key'); - if ($apiKey !== null) { - $headers['api-key'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation crmTasksIdDelete - * - * Delete a task - * - * @param string $id id (required) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - */ - public function crmTasksIdDelete($id) - { - $this->crmTasksIdDeleteWithHttpInfo($id); - } - - /** - * Operation crmTasksIdDeleteWithHttpInfo - * - * Delete a task - * - * @param string $id (required) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function crmTasksIdDeleteWithHttpInfo($id) - { - $returnType = ''; - $request = $this->crmTasksIdDeleteRequest($id); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\ErrorModel', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\ErrorModel', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation crmTasksIdDeleteAsync - * - * Delete a task - * - * @param string $id (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function crmTasksIdDeleteAsync($id) - { - return $this->crmTasksIdDeleteAsyncWithHttpInfo($id) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation crmTasksIdDeleteAsyncWithHttpInfo - * - * Delete a task - * - * @param string $id (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function crmTasksIdDeleteAsyncWithHttpInfo($id) - { - $returnType = ''; - $request = $this->crmTasksIdDeleteRequest($id); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'crmTasksIdDelete' - * - * @param string $id (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function crmTasksIdDeleteRequest($id) - { - // verify the required parameter 'id' is set - if ($id === null || (is_array($id) && count($id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $id when calling crmTasksIdDelete' - ); - } - - $resourcePath = '/crm/tasks/{id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($id !== null) { - $resourcePath = str_replace( - '{' . 'id' . '}', - ObjectSerializer::toPathValue($id), - $resourcePath - ); - } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - - if($headers['Content-Type'] === 'application/json') { - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass) { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - // array has no __toString(), so we should encode it manually - if(is_array($httpBody)) { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); - } - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('api-key'); - if ($apiKey !== null) { - $headers['api-key'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'DELETE', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation crmTasksIdGet - * - * Get a task - * - * @param string $id id (required) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \SendinBlue\Client\Model\Task - */ - public function crmTasksIdGet($id) - { - list($response) = $this->crmTasksIdGetWithHttpInfo($id); - return $response; - } - - /** - * Operation crmTasksIdGetWithHttpInfo - * - * Get a task - * - * @param string $id (required) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \SendinBlue\Client\Model\Task, HTTP status code, HTTP response headers (array of strings) - */ - public function crmTasksIdGetWithHttpInfo($id) - { - $returnType = '\SendinBlue\Client\Model\Task'; - $request = $this->crmTasksIdGetRequest($id); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\Task', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\ErrorModel', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\ErrorModel', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation crmTasksIdGetAsync - * - * Get a task - * - * @param string $id (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function crmTasksIdGetAsync($id) - { - return $this->crmTasksIdGetAsyncWithHttpInfo($id) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation crmTasksIdGetAsyncWithHttpInfo - * - * Get a task - * - * @param string $id (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function crmTasksIdGetAsyncWithHttpInfo($id) - { - $returnType = '\SendinBlue\Client\Model\Task'; - $request = $this->crmTasksIdGetRequest($id); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'crmTasksIdGet' - * - * @param string $id (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function crmTasksIdGetRequest($id) - { - // verify the required parameter 'id' is set - if ($id === null || (is_array($id) && count($id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $id when calling crmTasksIdGet' - ); - } - - $resourcePath = '/crm/tasks/{id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($id !== null) { - $resourcePath = str_replace( - '{' . 'id' . '}', - ObjectSerializer::toPathValue($id), - $resourcePath - ); - } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - - if($headers['Content-Type'] === 'application/json') { - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass) { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - // array has no __toString(), so we should encode it manually - if(is_array($httpBody)) { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); - } - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('api-key'); - if ($apiKey !== null) { - $headers['api-key'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation crmTasksIdPatch - * - * Update a task - * - * @param string $id id (required) - * @param \SendinBlue\Client\Model\Body1 $body Updated task details. (required) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - */ - public function crmTasksIdPatch($id, $body) - { - $this->crmTasksIdPatchWithHttpInfo($id, $body); - } - - /** - * Operation crmTasksIdPatchWithHttpInfo - * - * Update a task - * - * @param string $id (required) - * @param \SendinBlue\Client\Model\Body1 $body Updated task details. (required) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function crmTasksIdPatchWithHttpInfo($id, $body) - { - $returnType = ''; - $request = $this->crmTasksIdPatchRequest($id, $body); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\ErrorModel', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\ErrorModel', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation crmTasksIdPatchAsync - * - * Update a task - * - * @param string $id (required) - * @param \SendinBlue\Client\Model\Body1 $body Updated task details. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function crmTasksIdPatchAsync($id, $body) - { - return $this->crmTasksIdPatchAsyncWithHttpInfo($id, $body) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation crmTasksIdPatchAsyncWithHttpInfo - * - * Update a task - * - * @param string $id (required) - * @param \SendinBlue\Client\Model\Body1 $body Updated task details. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function crmTasksIdPatchAsyncWithHttpInfo($id, $body) - { - $returnType = ''; - $request = $this->crmTasksIdPatchRequest($id, $body); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'crmTasksIdPatch' - * - * @param string $id (required) - * @param \SendinBlue\Client\Model\Body1 $body Updated task details. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function crmTasksIdPatchRequest($id, $body) - { - // verify the required parameter 'id' is set - if ($id === null || (is_array($id) && count($id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $id when calling crmTasksIdPatch' - ); - } - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling crmTasksIdPatch' - ); - } - - $resourcePath = '/crm/tasks/{id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($id !== null) { - $resourcePath = str_replace( - '{' . 'id' . '}', - ObjectSerializer::toPathValue($id), - $resourcePath - ); - } - - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - - if($headers['Content-Type'] === 'application/json') { - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass) { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - // array has no __toString(), so we should encode it manually - if(is_array($httpBody)) { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); - } - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('api-key'); - if ($apiKey !== null) { - $headers['api-key'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'PATCH', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation crmTasksPost - * - * Create a task - * - * @param \SendinBlue\Client\Model\Body $body Task name. (required) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \SendinBlue\Client\Model\InlineResponse201 - */ - public function crmTasksPost($body) - { - list($response) = $this->crmTasksPostWithHttpInfo($body); - return $response; - } - - /** - * Operation crmTasksPostWithHttpInfo - * - * Create a task - * - * @param \SendinBlue\Client\Model\Body $body Task name. (required) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \SendinBlue\Client\Model\InlineResponse201, HTTP status code, HTTP response headers (array of strings) - */ - public function crmTasksPostWithHttpInfo($body) - { - $returnType = '\SendinBlue\Client\Model\InlineResponse201'; - $request = $this->crmTasksPostRequest($body); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 201: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\InlineResponse201', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation crmTasksPostAsync - * - * Create a task - * - * @param \SendinBlue\Client\Model\Body $body Task name. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function crmTasksPostAsync($body) - { - return $this->crmTasksPostAsyncWithHttpInfo($body) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation crmTasksPostAsyncWithHttpInfo - * - * Create a task - * - * @param \SendinBlue\Client\Model\Body $body Task name. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function crmTasksPostAsyncWithHttpInfo($body) - { - $returnType = '\SendinBlue\Client\Model\InlineResponse201'; - $request = $this->crmTasksPostRequest($body); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'crmTasksPost' - * - * @param \SendinBlue\Client\Model\Body $body Task name. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function crmTasksPostRequest($body) - { - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling crmTasksPost' - ); - } - - $resourcePath = '/crm/tasks'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - - if($headers['Content-Type'] === 'application/json') { - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass) { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - // array has no __toString(), so we should encode it manually - if(is_array($httpBody)) { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); - } - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('api-key'); - if ($apiKey !== null) { - $headers['api-key'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation crmTasktypesGet - * - * Get all task types - * - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \SendinBlue\Client\Model\TaskTypes - */ - public function crmTasktypesGet() - { - list($response) = $this->crmTasktypesGetWithHttpInfo(); - return $response; - } - - /** - * Operation crmTasktypesGetWithHttpInfo - * - * Get all task types - * - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \SendinBlue\Client\Model\TaskTypes, HTTP status code, HTTP response headers (array of strings) - */ - public function crmTasktypesGetWithHttpInfo() - { - $returnType = '\SendinBlue\Client\Model\TaskTypes'; - $request = $this->crmTasktypesGetRequest(); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\TaskTypes', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation crmTasktypesGetAsync - * - * Get all task types - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function crmTasktypesGetAsync() - { - return $this->crmTasktypesGetAsyncWithHttpInfo() - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation crmTasktypesGetAsyncWithHttpInfo - * - * Get all task types - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function crmTasktypesGetAsyncWithHttpInfo() - { - $returnType = '\SendinBlue\Client\Model\TaskTypes'; - $request = $this->crmTasktypesGetRequest(); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'crmTasktypesGet' - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function crmTasktypesGetRequest() - { - - $resourcePath = '/crm/tasktypes'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - - if($headers['Content-Type'] === 'application/json') { - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass) { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - // array has no __toString(), so we should encode it manually - if(is_array($httpBody)) { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); - } - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('api-key'); - if ($apiKey !== null) { - $headers['api-key'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Create http client option - * - * @throws \RuntimeException on file opening failure - * @return array of http client options - */ - protected function createHttpClientOption() - { - $options = []; - if ($this->config->getDebug()) { - $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); - if (!$options[RequestOptions::DEBUG]) { - throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); - } - } - - return $options; - } -} diff --git a/lib/Api/ContactsApi.php b/lib/Api/ContactsApi.php index 8a88b8ff..b86c4cff 100644 --- a/lib/Api/ContactsApi.php +++ b/lib/Api/ContactsApi.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -92,16 +92,16 @@ public function getConfig() * * Add existing contacts to a list * - * @param int $listId Id of the list (required) - * @param \SendinBlue\Client\Model\AddContactToList $contactEmails Emails addresses OR IDs of the contacts (required) + * @param int $list_id Id of the list (required) + * @param \SendinBlue\Client\Model\AddContactToList $contact_emails Emails addresses of the contacts (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\PostContactInfo */ - public function addContactToList($listId, $contactEmails) + public function addContactToList($list_id, $contact_emails) { - list($response) = $this->addContactToListWithHttpInfo($listId, $contactEmails); + list($response) = $this->addContactToListWithHttpInfo($list_id, $contact_emails); return $response; } @@ -110,17 +110,17 @@ public function addContactToList($listId, $contactEmails) * * Add existing contacts to a list * - * @param int $listId Id of the list (required) - * @param \SendinBlue\Client\Model\AddContactToList $contactEmails Emails addresses OR IDs of the contacts (required) + * @param int $list_id Id of the list (required) + * @param \SendinBlue\Client\Model\AddContactToList $contact_emails Emails addresses of the contacts (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\PostContactInfo, HTTP status code, HTTP response headers (array of strings) */ - public function addContactToListWithHttpInfo($listId, $contactEmails) + public function addContactToListWithHttpInfo($list_id, $contact_emails) { $returnType = '\SendinBlue\Client\Model\PostContactInfo'; - $request = $this->addContactToListRequest($listId, $contactEmails); + $request = $this->addContactToListRequest($list_id, $contact_emails); try { $options = $this->createHttpClientOption(); @@ -202,15 +202,15 @@ public function addContactToListWithHttpInfo($listId, $contactEmails) * * Add existing contacts to a list * - * @param int $listId Id of the list (required) - * @param \SendinBlue\Client\Model\AddContactToList $contactEmails Emails addresses OR IDs of the contacts (required) + * @param int $list_id Id of the list (required) + * @param \SendinBlue\Client\Model\AddContactToList $contact_emails Emails addresses of the contacts (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addContactToListAsync($listId, $contactEmails) + public function addContactToListAsync($list_id, $contact_emails) { - return $this->addContactToListAsyncWithHttpInfo($listId, $contactEmails) + return $this->addContactToListAsyncWithHttpInfo($list_id, $contact_emails) ->then( function ($response) { return $response[0]; @@ -223,16 +223,16 @@ function ($response) { * * Add existing contacts to a list * - * @param int $listId Id of the list (required) - * @param \SendinBlue\Client\Model\AddContactToList $contactEmails Emails addresses OR IDs of the contacts (required) + * @param int $list_id Id of the list (required) + * @param \SendinBlue\Client\Model\AddContactToList $contact_emails Emails addresses of the contacts (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addContactToListAsyncWithHttpInfo($listId, $contactEmails) + public function addContactToListAsyncWithHttpInfo($list_id, $contact_emails) { $returnType = '\SendinBlue\Client\Model\PostContactInfo'; - $request = $this->addContactToListRequest($listId, $contactEmails); + $request = $this->addContactToListRequest($list_id, $contact_emails); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -274,24 +274,24 @@ function ($exception) { /** * Create request for operation 'addContactToList' * - * @param int $listId Id of the list (required) - * @param \SendinBlue\Client\Model\AddContactToList $contactEmails Emails addresses OR IDs of the contacts (required) + * @param int $list_id Id of the list (required) + * @param \SendinBlue\Client\Model\AddContactToList $contact_emails Emails addresses of the contacts (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function addContactToListRequest($listId, $contactEmails) + protected function addContactToListRequest($list_id, $contact_emails) { - // verify the required parameter 'listId' is set - if ($listId === null || (is_array($listId) && count($listId) === 0)) { + // verify the required parameter 'list_id' is set + if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $listId when calling addContactToList' + 'Missing the required parameter $list_id when calling addContactToList' ); } - // verify the required parameter 'contactEmails' is set - if ($contactEmails === null || (is_array($contactEmails) && count($contactEmails) === 0)) { + // verify the required parameter 'contact_emails' is set + if ($contact_emails === null || (is_array($contact_emails) && count($contact_emails) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $contactEmails when calling addContactToList' + 'Missing the required parameter $contact_emails when calling addContactToList' ); } @@ -304,18 +304,18 @@ protected function addContactToListRequest($listId, $contactEmails) // path params - if ($listId !== null) { + if ($list_id !== null) { $resourcePath = str_replace( '{' . 'listId' . '}', - ObjectSerializer::toPathValue($listId), + ObjectSerializer::toPathValue($list_id), $resourcePath ); } // body params $_tempBody = null; - if (isset($contactEmails)) { - $_tempBody = $contactEmails; + if (isset($contact_emails)) { + $_tempBody = $contact_emails; } if ($multipart) { @@ -370,11 +370,6 @@ protected function addContactToListRequest($listId, $contactEmails) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -401,17 +396,17 @@ protected function addContactToListRequest($listId, $contactEmails) * * Create contact attribute * - * @param string $attributeCategory Category of the attribute (required) - * @param string $attributeName Name of the attribute (required) - * @param \SendinBlue\Client\Model\CreateAttribute $createAttribute Values to create an attribute (required) + * @param string $attribute_category Category of the attribute (required) + * @param string $attribute_name Name of the attribute (required) + * @param \SendinBlue\Client\Model\CreateAttribute $create_attribute Values to create an attribute (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function createAttribute($attributeCategory, $attributeName, $createAttribute) + public function createAttribute($attribute_category, $attribute_name, $create_attribute) { - $this->createAttributeWithHttpInfo($attributeCategory, $attributeName, $createAttribute); + $this->createAttributeWithHttpInfo($attribute_category, $attribute_name, $create_attribute); } /** @@ -419,18 +414,18 @@ public function createAttribute($attributeCategory, $attributeName, $createAttri * * Create contact attribute * - * @param string $attributeCategory Category of the attribute (required) - * @param string $attributeName Name of the attribute (required) - * @param \SendinBlue\Client\Model\CreateAttribute $createAttribute Values to create an attribute (required) + * @param string $attribute_category Category of the attribute (required) + * @param string $attribute_name Name of the attribute (required) + * @param \SendinBlue\Client\Model\CreateAttribute $create_attribute Values to create an attribute (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function createAttributeWithHttpInfo($attributeCategory, $attributeName, $createAttribute) + public function createAttributeWithHttpInfo($attribute_category, $attribute_name, $create_attribute) { $returnType = ''; - $request = $this->createAttributeRequest($attributeCategory, $attributeName, $createAttribute); + $request = $this->createAttributeRequest($attribute_category, $attribute_name, $create_attribute); try { $options = $this->createHttpClientOption(); @@ -482,16 +477,16 @@ public function createAttributeWithHttpInfo($attributeCategory, $attributeName, * * Create contact attribute * - * @param string $attributeCategory Category of the attribute (required) - * @param string $attributeName Name of the attribute (required) - * @param \SendinBlue\Client\Model\CreateAttribute $createAttribute Values to create an attribute (required) + * @param string $attribute_category Category of the attribute (required) + * @param string $attribute_name Name of the attribute (required) + * @param \SendinBlue\Client\Model\CreateAttribute $create_attribute Values to create an attribute (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createAttributeAsync($attributeCategory, $attributeName, $createAttribute) + public function createAttributeAsync($attribute_category, $attribute_name, $create_attribute) { - return $this->createAttributeAsyncWithHttpInfo($attributeCategory, $attributeName, $createAttribute) + return $this->createAttributeAsyncWithHttpInfo($attribute_category, $attribute_name, $create_attribute) ->then( function ($response) { return $response[0]; @@ -504,17 +499,17 @@ function ($response) { * * Create contact attribute * - * @param string $attributeCategory Category of the attribute (required) - * @param string $attributeName Name of the attribute (required) - * @param \SendinBlue\Client\Model\CreateAttribute $createAttribute Values to create an attribute (required) + * @param string $attribute_category Category of the attribute (required) + * @param string $attribute_name Name of the attribute (required) + * @param \SendinBlue\Client\Model\CreateAttribute $create_attribute Values to create an attribute (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createAttributeAsyncWithHttpInfo($attributeCategory, $attributeName, $createAttribute) + public function createAttributeAsyncWithHttpInfo($attribute_category, $attribute_name, $create_attribute) { $returnType = ''; - $request = $this->createAttributeRequest($attributeCategory, $attributeName, $createAttribute); + $request = $this->createAttributeRequest($attribute_category, $attribute_name, $create_attribute); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -542,31 +537,31 @@ function ($exception) { /** * Create request for operation 'createAttribute' * - * @param string $attributeCategory Category of the attribute (required) - * @param string $attributeName Name of the attribute (required) - * @param \SendinBlue\Client\Model\CreateAttribute $createAttribute Values to create an attribute (required) + * @param string $attribute_category Category of the attribute (required) + * @param string $attribute_name Name of the attribute (required) + * @param \SendinBlue\Client\Model\CreateAttribute $create_attribute Values to create an attribute (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function createAttributeRequest($attributeCategory, $attributeName, $createAttribute) + protected function createAttributeRequest($attribute_category, $attribute_name, $create_attribute) { - // verify the required parameter 'attributeCategory' is set - if ($attributeCategory === null || (is_array($attributeCategory) && count($attributeCategory) === 0)) { + // verify the required parameter 'attribute_category' is set + if ($attribute_category === null || (is_array($attribute_category) && count($attribute_category) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $attributeCategory when calling createAttribute' + 'Missing the required parameter $attribute_category when calling createAttribute' ); } - // verify the required parameter 'attributeName' is set - if ($attributeName === null || (is_array($attributeName) && count($attributeName) === 0)) { + // verify the required parameter 'attribute_name' is set + if ($attribute_name === null || (is_array($attribute_name) && count($attribute_name) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $attributeName when calling createAttribute' + 'Missing the required parameter $attribute_name when calling createAttribute' ); } - // verify the required parameter 'createAttribute' is set - if ($createAttribute === null || (is_array($createAttribute) && count($createAttribute) === 0)) { + // verify the required parameter 'create_attribute' is set + if ($create_attribute === null || (is_array($create_attribute) && count($create_attribute) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $createAttribute when calling createAttribute' + 'Missing the required parameter $create_attribute when calling createAttribute' ); } @@ -579,26 +574,26 @@ protected function createAttributeRequest($attributeCategory, $attributeName, $c // path params - if ($attributeCategory !== null) { + if ($attribute_category !== null) { $resourcePath = str_replace( '{' . 'attributeCategory' . '}', - ObjectSerializer::toPathValue($attributeCategory), + ObjectSerializer::toPathValue($attribute_category), $resourcePath ); } // path params - if ($attributeName !== null) { + if ($attribute_name !== null) { $resourcePath = str_replace( '{' . 'attributeName' . '}', - ObjectSerializer::toPathValue($attributeName), + ObjectSerializer::toPathValue($attribute_name), $resourcePath ); } // body params $_tempBody = null; - if (isset($createAttribute)) { - $_tempBody = $createAttribute; + if (isset($create_attribute)) { + $_tempBody = $create_attribute; } if ($multipart) { @@ -653,11 +648,6 @@ protected function createAttributeRequest($attributeCategory, $attributeName, $c if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -684,15 +674,15 @@ protected function createAttributeRequest($attributeCategory, $attributeName, $c * * Create a contact * - * @param \SendinBlue\Client\Model\CreateContact $createContact Values to create a contact (required) + * @param \SendinBlue\Client\Model\CreateContact $create_contact Values to create a contact (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\CreateUpdateContactModel */ - public function createContact($createContact) + public function createContact($create_contact) { - list($response) = $this->createContactWithHttpInfo($createContact); + list($response) = $this->createContactWithHttpInfo($create_contact); return $response; } @@ -701,16 +691,16 @@ public function createContact($createContact) * * Create a contact * - * @param \SendinBlue\Client\Model\CreateContact $createContact Values to create a contact (required) + * @param \SendinBlue\Client\Model\CreateContact $create_contact Values to create a contact (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\CreateUpdateContactModel, HTTP status code, HTTP response headers (array of strings) */ - public function createContactWithHttpInfo($createContact) + public function createContactWithHttpInfo($create_contact) { $returnType = '\SendinBlue\Client\Model\CreateUpdateContactModel'; - $request = $this->createContactRequest($createContact); + $request = $this->createContactRequest($create_contact); try { $options = $this->createHttpClientOption(); @@ -792,14 +782,14 @@ public function createContactWithHttpInfo($createContact) * * Create a contact * - * @param \SendinBlue\Client\Model\CreateContact $createContact Values to create a contact (required) + * @param \SendinBlue\Client\Model\CreateContact $create_contact Values to create a contact (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createContactAsync($createContact) + public function createContactAsync($create_contact) { - return $this->createContactAsyncWithHttpInfo($createContact) + return $this->createContactAsyncWithHttpInfo($create_contact) ->then( function ($response) { return $response[0]; @@ -812,15 +802,15 @@ function ($response) { * * Create a contact * - * @param \SendinBlue\Client\Model\CreateContact $createContact Values to create a contact (required) + * @param \SendinBlue\Client\Model\CreateContact $create_contact Values to create a contact (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createContactAsyncWithHttpInfo($createContact) + public function createContactAsyncWithHttpInfo($create_contact) { $returnType = '\SendinBlue\Client\Model\CreateUpdateContactModel'; - $request = $this->createContactRequest($createContact); + $request = $this->createContactRequest($create_contact); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -862,17 +852,17 @@ function ($exception) { /** * Create request for operation 'createContact' * - * @param \SendinBlue\Client\Model\CreateContact $createContact Values to create a contact (required) + * @param \SendinBlue\Client\Model\CreateContact $create_contact Values to create a contact (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function createContactRequest($createContact) + protected function createContactRequest($create_contact) { - // verify the required parameter 'createContact' is set - if ($createContact === null || (is_array($createContact) && count($createContact) === 0)) { + // verify the required parameter 'create_contact' is set + if ($create_contact === null || (is_array($create_contact) && count($create_contact) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $createContact when calling createContact' + 'Missing the required parameter $create_contact when calling createContact' ); } @@ -887,8 +877,8 @@ protected function createContactRequest($createContact) // body params $_tempBody = null; - if (isset($createContact)) { - $_tempBody = $createContact; + if (isset($create_contact)) { + $_tempBody = $create_contact; } if ($multipart) { @@ -943,11 +933,6 @@ protected function createContactRequest($createContact) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -974,15 +959,15 @@ protected function createContactRequest($createContact) * * Create Contact via DOI (Double-Opt-In) Flow * - * @param \SendinBlue\Client\Model\CreateDoiContact $createDoiContact Values to create the Double opt-in (DOI) contact (required) + * @param \SendinBlue\Client\Model\CreateDoiContact $create_doi_contact Values to create the Double opt-in (DOI) contact (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function createDoiContact($createDoiContact) + public function createDoiContact($create_doi_contact) { - $this->createDoiContactWithHttpInfo($createDoiContact); + $this->createDoiContactWithHttpInfo($create_doi_contact); } /** @@ -990,16 +975,16 @@ public function createDoiContact($createDoiContact) * * Create Contact via DOI (Double-Opt-In) Flow * - * @param \SendinBlue\Client\Model\CreateDoiContact $createDoiContact Values to create the Double opt-in (DOI) contact (required) + * @param \SendinBlue\Client\Model\CreateDoiContact $create_doi_contact Values to create the Double opt-in (DOI) contact (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function createDoiContactWithHttpInfo($createDoiContact) + public function createDoiContactWithHttpInfo($create_doi_contact) { $returnType = ''; - $request = $this->createDoiContactRequest($createDoiContact); + $request = $this->createDoiContactRequest($create_doi_contact); try { $options = $this->createHttpClientOption(); @@ -1051,14 +1036,14 @@ public function createDoiContactWithHttpInfo($createDoiContact) * * Create Contact via DOI (Double-Opt-In) Flow * - * @param \SendinBlue\Client\Model\CreateDoiContact $createDoiContact Values to create the Double opt-in (DOI) contact (required) + * @param \SendinBlue\Client\Model\CreateDoiContact $create_doi_contact Values to create the Double opt-in (DOI) contact (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createDoiContactAsync($createDoiContact) + public function createDoiContactAsync($create_doi_contact) { - return $this->createDoiContactAsyncWithHttpInfo($createDoiContact) + return $this->createDoiContactAsyncWithHttpInfo($create_doi_contact) ->then( function ($response) { return $response[0]; @@ -1071,15 +1056,15 @@ function ($response) { * * Create Contact via DOI (Double-Opt-In) Flow * - * @param \SendinBlue\Client\Model\CreateDoiContact $createDoiContact Values to create the Double opt-in (DOI) contact (required) + * @param \SendinBlue\Client\Model\CreateDoiContact $create_doi_contact Values to create the Double opt-in (DOI) contact (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createDoiContactAsyncWithHttpInfo($createDoiContact) + public function createDoiContactAsyncWithHttpInfo($create_doi_contact) { $returnType = ''; - $request = $this->createDoiContactRequest($createDoiContact); + $request = $this->createDoiContactRequest($create_doi_contact); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1107,17 +1092,17 @@ function ($exception) { /** * Create request for operation 'createDoiContact' * - * @param \SendinBlue\Client\Model\CreateDoiContact $createDoiContact Values to create the Double opt-in (DOI) contact (required) + * @param \SendinBlue\Client\Model\CreateDoiContact $create_doi_contact Values to create the Double opt-in (DOI) contact (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function createDoiContactRequest($createDoiContact) + protected function createDoiContactRequest($create_doi_contact) { - // verify the required parameter 'createDoiContact' is set - if ($createDoiContact === null || (is_array($createDoiContact) && count($createDoiContact) === 0)) { + // verify the required parameter 'create_doi_contact' is set + if ($create_doi_contact === null || (is_array($create_doi_contact) && count($create_doi_contact) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $createDoiContact when calling createDoiContact' + 'Missing the required parameter $create_doi_contact when calling createDoiContact' ); } @@ -1132,8 +1117,8 @@ protected function createDoiContactRequest($createDoiContact) // body params $_tempBody = null; - if (isset($createDoiContact)) { - $_tempBody = $createDoiContact; + if (isset($create_doi_contact)) { + $_tempBody = $create_doi_contact; } if ($multipart) { @@ -1188,11 +1173,6 @@ protected function createDoiContactRequest($createDoiContact) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1219,15 +1199,15 @@ protected function createDoiContactRequest($createDoiContact) * * Create a folder * - * @param \SendinBlue\Client\Model\CreateUpdateFolder $createFolder Name of the folder (required) + * @param \SendinBlue\Client\Model\CreateUpdateFolder $create_folder Name of the folder (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\CreateModel */ - public function createFolder($createFolder) + public function createFolder($create_folder) { - list($response) = $this->createFolderWithHttpInfo($createFolder); + list($response) = $this->createFolderWithHttpInfo($create_folder); return $response; } @@ -1236,16 +1216,16 @@ public function createFolder($createFolder) * * Create a folder * - * @param \SendinBlue\Client\Model\CreateUpdateFolder $createFolder Name of the folder (required) + * @param \SendinBlue\Client\Model\CreateUpdateFolder $create_folder Name of the folder (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\CreateModel, HTTP status code, HTTP response headers (array of strings) */ - public function createFolderWithHttpInfo($createFolder) + public function createFolderWithHttpInfo($create_folder) { $returnType = '\SendinBlue\Client\Model\CreateModel'; - $request = $this->createFolderRequest($createFolder); + $request = $this->createFolderRequest($create_folder); try { $options = $this->createHttpClientOption(); @@ -1319,14 +1299,14 @@ public function createFolderWithHttpInfo($createFolder) * * Create a folder * - * @param \SendinBlue\Client\Model\CreateUpdateFolder $createFolder Name of the folder (required) + * @param \SendinBlue\Client\Model\CreateUpdateFolder $create_folder Name of the folder (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createFolderAsync($createFolder) + public function createFolderAsync($create_folder) { - return $this->createFolderAsyncWithHttpInfo($createFolder) + return $this->createFolderAsyncWithHttpInfo($create_folder) ->then( function ($response) { return $response[0]; @@ -1339,15 +1319,15 @@ function ($response) { * * Create a folder * - * @param \SendinBlue\Client\Model\CreateUpdateFolder $createFolder Name of the folder (required) + * @param \SendinBlue\Client\Model\CreateUpdateFolder $create_folder Name of the folder (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createFolderAsyncWithHttpInfo($createFolder) + public function createFolderAsyncWithHttpInfo($create_folder) { $returnType = '\SendinBlue\Client\Model\CreateModel'; - $request = $this->createFolderRequest($createFolder); + $request = $this->createFolderRequest($create_folder); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1389,17 +1369,17 @@ function ($exception) { /** * Create request for operation 'createFolder' * - * @param \SendinBlue\Client\Model\CreateUpdateFolder $createFolder Name of the folder (required) + * @param \SendinBlue\Client\Model\CreateUpdateFolder $create_folder Name of the folder (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function createFolderRequest($createFolder) + protected function createFolderRequest($create_folder) { - // verify the required parameter 'createFolder' is set - if ($createFolder === null || (is_array($createFolder) && count($createFolder) === 0)) { + // verify the required parameter 'create_folder' is set + if ($create_folder === null || (is_array($create_folder) && count($create_folder) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $createFolder when calling createFolder' + 'Missing the required parameter $create_folder when calling createFolder' ); } @@ -1414,8 +1394,8 @@ protected function createFolderRequest($createFolder) // body params $_tempBody = null; - if (isset($createFolder)) { - $_tempBody = $createFolder; + if (isset($create_folder)) { + $_tempBody = $create_folder; } if ($multipart) { @@ -1470,11 +1450,6 @@ protected function createFolderRequest($createFolder) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1501,15 +1476,15 @@ protected function createFolderRequest($createFolder) * * Create a list * - * @param \SendinBlue\Client\Model\CreateList $createList Values to create a list (required) + * @param \SendinBlue\Client\Model\CreateList $create_list Values to create a list (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\CreateModel */ - public function createList($createList) + public function createList($create_list) { - list($response) = $this->createListWithHttpInfo($createList); + list($response) = $this->createListWithHttpInfo($create_list); return $response; } @@ -1518,16 +1493,16 @@ public function createList($createList) * * Create a list * - * @param \SendinBlue\Client\Model\CreateList $createList Values to create a list (required) + * @param \SendinBlue\Client\Model\CreateList $create_list Values to create a list (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\CreateModel, HTTP status code, HTTP response headers (array of strings) */ - public function createListWithHttpInfo($createList) + public function createListWithHttpInfo($create_list) { $returnType = '\SendinBlue\Client\Model\CreateModel'; - $request = $this->createListRequest($createList); + $request = $this->createListRequest($create_list); try { $options = $this->createHttpClientOption(); @@ -1601,14 +1576,14 @@ public function createListWithHttpInfo($createList) * * Create a list * - * @param \SendinBlue\Client\Model\CreateList $createList Values to create a list (required) + * @param \SendinBlue\Client\Model\CreateList $create_list Values to create a list (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createListAsync($createList) + public function createListAsync($create_list) { - return $this->createListAsyncWithHttpInfo($createList) + return $this->createListAsyncWithHttpInfo($create_list) ->then( function ($response) { return $response[0]; @@ -1621,15 +1596,15 @@ function ($response) { * * Create a list * - * @param \SendinBlue\Client\Model\CreateList $createList Values to create a list (required) + * @param \SendinBlue\Client\Model\CreateList $create_list Values to create a list (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createListAsyncWithHttpInfo($createList) + public function createListAsyncWithHttpInfo($create_list) { $returnType = '\SendinBlue\Client\Model\CreateModel'; - $request = $this->createListRequest($createList); + $request = $this->createListRequest($create_list); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1671,17 +1646,17 @@ function ($exception) { /** * Create request for operation 'createList' * - * @param \SendinBlue\Client\Model\CreateList $createList Values to create a list (required) + * @param \SendinBlue\Client\Model\CreateList $create_list Values to create a list (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function createListRequest($createList) + protected function createListRequest($create_list) { - // verify the required parameter 'createList' is set - if ($createList === null || (is_array($createList) && count($createList) === 0)) { + // verify the required parameter 'create_list' is set + if ($create_list === null || (is_array($create_list) && count($create_list) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $createList when calling createList' + 'Missing the required parameter $create_list when calling createList' ); } @@ -1696,8 +1671,8 @@ protected function createListRequest($createList) // body params $_tempBody = null; - if (isset($createList)) { - $_tempBody = $createList; + if (isset($create_list)) { + $_tempBody = $create_list; } if ($multipart) { @@ -1752,11 +1727,6 @@ protected function createListRequest($createList) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1783,16 +1753,16 @@ protected function createListRequest($createList) * * Delete an attribute * - * @param string $attributeCategory Category of the attribute (required) - * @param string $attributeName Name of the existing attribute (required) + * @param string $attribute_category Category of the attribute (required) + * @param string $attribute_name Name of the existing attribute (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function deleteAttribute($attributeCategory, $attributeName) + public function deleteAttribute($attribute_category, $attribute_name) { - $this->deleteAttributeWithHttpInfo($attributeCategory, $attributeName); + $this->deleteAttributeWithHttpInfo($attribute_category, $attribute_name); } /** @@ -1800,17 +1770,17 @@ public function deleteAttribute($attributeCategory, $attributeName) * * Delete an attribute * - * @param string $attributeCategory Category of the attribute (required) - * @param string $attributeName Name of the existing attribute (required) + * @param string $attribute_category Category of the attribute (required) + * @param string $attribute_name Name of the existing attribute (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteAttributeWithHttpInfo($attributeCategory, $attributeName) + public function deleteAttributeWithHttpInfo($attribute_category, $attribute_name) { $returnType = ''; - $request = $this->deleteAttributeRequest($attributeCategory, $attributeName); + $request = $this->deleteAttributeRequest($attribute_category, $attribute_name); try { $options = $this->createHttpClientOption(); @@ -1844,7 +1814,7 @@ public function deleteAttributeWithHttpInfo($attributeCategory, $attributeName) } catch (ApiException $e) { switch ($e->getCode()) { - case 400: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -1852,7 +1822,7 @@ public function deleteAttributeWithHttpInfo($attributeCategory, $attributeName) ); $e->setResponseObject($data); break; - case 404: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -1870,15 +1840,15 @@ public function deleteAttributeWithHttpInfo($attributeCategory, $attributeName) * * Delete an attribute * - * @param string $attributeCategory Category of the attribute (required) - * @param string $attributeName Name of the existing attribute (required) + * @param string $attribute_category Category of the attribute (required) + * @param string $attribute_name Name of the existing attribute (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteAttributeAsync($attributeCategory, $attributeName) + public function deleteAttributeAsync($attribute_category, $attribute_name) { - return $this->deleteAttributeAsyncWithHttpInfo($attributeCategory, $attributeName) + return $this->deleteAttributeAsyncWithHttpInfo($attribute_category, $attribute_name) ->then( function ($response) { return $response[0]; @@ -1891,16 +1861,16 @@ function ($response) { * * Delete an attribute * - * @param string $attributeCategory Category of the attribute (required) - * @param string $attributeName Name of the existing attribute (required) + * @param string $attribute_category Category of the attribute (required) + * @param string $attribute_name Name of the existing attribute (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteAttributeAsyncWithHttpInfo($attributeCategory, $attributeName) + public function deleteAttributeAsyncWithHttpInfo($attribute_category, $attribute_name) { $returnType = ''; - $request = $this->deleteAttributeRequest($attributeCategory, $attributeName); + $request = $this->deleteAttributeRequest($attribute_category, $attribute_name); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1928,24 +1898,24 @@ function ($exception) { /** * Create request for operation 'deleteAttribute' * - * @param string $attributeCategory Category of the attribute (required) - * @param string $attributeName Name of the existing attribute (required) + * @param string $attribute_category Category of the attribute (required) + * @param string $attribute_name Name of the existing attribute (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function deleteAttributeRequest($attributeCategory, $attributeName) + protected function deleteAttributeRequest($attribute_category, $attribute_name) { - // verify the required parameter 'attributeCategory' is set - if ($attributeCategory === null || (is_array($attributeCategory) && count($attributeCategory) === 0)) { + // verify the required parameter 'attribute_category' is set + if ($attribute_category === null || (is_array($attribute_category) && count($attribute_category) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $attributeCategory when calling deleteAttribute' + 'Missing the required parameter $attribute_category when calling deleteAttribute' ); } - // verify the required parameter 'attributeName' is set - if ($attributeName === null || (is_array($attributeName) && count($attributeName) === 0)) { + // verify the required parameter 'attribute_name' is set + if ($attribute_name === null || (is_array($attribute_name) && count($attribute_name) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $attributeName when calling deleteAttribute' + 'Missing the required parameter $attribute_name when calling deleteAttribute' ); } @@ -1958,18 +1928,18 @@ protected function deleteAttributeRequest($attributeCategory, $attributeName) // path params - if ($attributeCategory !== null) { + if ($attribute_category !== null) { $resourcePath = str_replace( '{' . 'attributeCategory' . '}', - ObjectSerializer::toPathValue($attributeCategory), + ObjectSerializer::toPathValue($attribute_category), $resourcePath ); } // path params - if ($attributeName !== null) { + if ($attribute_name !== null) { $resourcePath = str_replace( '{' . 'attributeName' . '}', - ObjectSerializer::toPathValue($attributeName), + ObjectSerializer::toPathValue($attribute_name), $resourcePath ); } @@ -2029,11 +1999,6 @@ protected function deleteAttributeRequest($attributeCategory, $attributeName) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -2060,15 +2025,15 @@ protected function deleteAttributeRequest($attributeCategory, $attributeName) * * Delete a contact * - * @param string $identifier Email (urlencoded) OR ID of the contact (required) + * @param string $email Email (urlencoded) of the contact (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function deleteContact($identifier) + public function deleteContact($email) { - $this->deleteContactWithHttpInfo($identifier); + $this->deleteContactWithHttpInfo($email); } /** @@ -2076,16 +2041,16 @@ public function deleteContact($identifier) * * Delete a contact * - * @param string $identifier Email (urlencoded) OR ID of the contact (required) + * @param string $email Email (urlencoded) of the contact (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteContactWithHttpInfo($identifier) + public function deleteContactWithHttpInfo($email) { $returnType = ''; - $request = $this->deleteContactRequest($identifier); + $request = $this->deleteContactRequest($email); try { $options = $this->createHttpClientOption(); @@ -2119,7 +2084,7 @@ public function deleteContactWithHttpInfo($identifier) } catch (ApiException $e) { switch ($e->getCode()) { - case 400: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -2127,7 +2092,7 @@ public function deleteContactWithHttpInfo($identifier) ); $e->setResponseObject($data); break; - case 404: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -2153,14 +2118,14 @@ public function deleteContactWithHttpInfo($identifier) * * Delete a contact * - * @param string $identifier Email (urlencoded) OR ID of the contact (required) + * @param string $email Email (urlencoded) of the contact (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteContactAsync($identifier) + public function deleteContactAsync($email) { - return $this->deleteContactAsyncWithHttpInfo($identifier) + return $this->deleteContactAsyncWithHttpInfo($email) ->then( function ($response) { return $response[0]; @@ -2173,15 +2138,15 @@ function ($response) { * * Delete a contact * - * @param string $identifier Email (urlencoded) OR ID of the contact (required) + * @param string $email Email (urlencoded) of the contact (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteContactAsyncWithHttpInfo($identifier) + public function deleteContactAsyncWithHttpInfo($email) { $returnType = ''; - $request = $this->deleteContactRequest($identifier); + $request = $this->deleteContactRequest($email); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2209,21 +2174,21 @@ function ($exception) { /** * Create request for operation 'deleteContact' * - * @param string $identifier Email (urlencoded) OR ID of the contact (required) + * @param string $email Email (urlencoded) of the contact (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function deleteContactRequest($identifier) + protected function deleteContactRequest($email) { - // verify the required parameter 'identifier' is set - if ($identifier === null || (is_array($identifier) && count($identifier) === 0)) { + // verify the required parameter 'email' is set + if ($email === null || (is_array($email) && count($email) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $identifier when calling deleteContact' + 'Missing the required parameter $email when calling deleteContact' ); } - $resourcePath = '/contacts/{identifier}'; + $resourcePath = '/contacts/{email}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -2232,10 +2197,10 @@ protected function deleteContactRequest($identifier) // path params - if ($identifier !== null) { + if ($email !== null) { $resourcePath = str_replace( - '{' . 'identifier' . '}', - ObjectSerializer::toPathValue($identifier), + '{' . 'email' . '}', + ObjectSerializer::toPathValue($email), $resourcePath ); } @@ -2295,11 +2260,6 @@ protected function deleteContactRequest($identifier) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -2326,15 +2286,15 @@ protected function deleteContactRequest($identifier) * * Delete a folder (and all its lists) * - * @param int $folderId Id of the folder (required) + * @param int $folder_id Id of the folder (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function deleteFolder($folderId) + public function deleteFolder($folder_id) { - $this->deleteFolderWithHttpInfo($folderId); + $this->deleteFolderWithHttpInfo($folder_id); } /** @@ -2342,16 +2302,16 @@ public function deleteFolder($folderId) * * Delete a folder (and all its lists) * - * @param int $folderId Id of the folder (required) + * @param int $folder_id Id of the folder (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteFolderWithHttpInfo($folderId) + public function deleteFolderWithHttpInfo($folder_id) { $returnType = ''; - $request = $this->deleteFolderRequest($folderId); + $request = $this->deleteFolderRequest($folder_id); try { $options = $this->createHttpClientOption(); @@ -2385,7 +2345,7 @@ public function deleteFolderWithHttpInfo($folderId) } catch (ApiException $e) { switch ($e->getCode()) { - case 400: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -2393,7 +2353,7 @@ public function deleteFolderWithHttpInfo($folderId) ); $e->setResponseObject($data); break; - case 404: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -2411,14 +2371,14 @@ public function deleteFolderWithHttpInfo($folderId) * * Delete a folder (and all its lists) * - * @param int $folderId Id of the folder (required) + * @param int $folder_id Id of the folder (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteFolderAsync($folderId) + public function deleteFolderAsync($folder_id) { - return $this->deleteFolderAsyncWithHttpInfo($folderId) + return $this->deleteFolderAsyncWithHttpInfo($folder_id) ->then( function ($response) { return $response[0]; @@ -2431,15 +2391,15 @@ function ($response) { * * Delete a folder (and all its lists) * - * @param int $folderId Id of the folder (required) + * @param int $folder_id Id of the folder (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteFolderAsyncWithHttpInfo($folderId) + public function deleteFolderAsyncWithHttpInfo($folder_id) { $returnType = ''; - $request = $this->deleteFolderRequest($folderId); + $request = $this->deleteFolderRequest($folder_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2467,17 +2427,17 @@ function ($exception) { /** * Create request for operation 'deleteFolder' * - * @param int $folderId Id of the folder (required) + * @param int $folder_id Id of the folder (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function deleteFolderRequest($folderId) + protected function deleteFolderRequest($folder_id) { - // verify the required parameter 'folderId' is set - if ($folderId === null || (is_array($folderId) && count($folderId) === 0)) { + // verify the required parameter 'folder_id' is set + if ($folder_id === null || (is_array($folder_id) && count($folder_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $folderId when calling deleteFolder' + 'Missing the required parameter $folder_id when calling deleteFolder' ); } @@ -2490,10 +2450,10 @@ protected function deleteFolderRequest($folderId) // path params - if ($folderId !== null) { + if ($folder_id !== null) { $resourcePath = str_replace( '{' . 'folderId' . '}', - ObjectSerializer::toPathValue($folderId), + ObjectSerializer::toPathValue($folder_id), $resourcePath ); } @@ -2553,11 +2513,6 @@ protected function deleteFolderRequest($folderId) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -2584,15 +2539,15 @@ protected function deleteFolderRequest($folderId) * * Delete a list * - * @param int $listId Id of the list (required) + * @param int $list_id Id of the list (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function deleteList($listId) + public function deleteList($list_id) { - $this->deleteListWithHttpInfo($listId); + $this->deleteListWithHttpInfo($list_id); } /** @@ -2600,16 +2555,16 @@ public function deleteList($listId) * * Delete a list * - * @param int $listId Id of the list (required) + * @param int $list_id Id of the list (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteListWithHttpInfo($listId) + public function deleteListWithHttpInfo($list_id) { $returnType = ''; - $request = $this->deleteListRequest($listId); + $request = $this->deleteListRequest($list_id); try { $options = $this->createHttpClientOption(); @@ -2643,7 +2598,7 @@ public function deleteListWithHttpInfo($listId) } catch (ApiException $e) { switch ($e->getCode()) { - case 400: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -2651,7 +2606,7 @@ public function deleteListWithHttpInfo($listId) ); $e->setResponseObject($data); break; - case 404: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -2669,14 +2624,14 @@ public function deleteListWithHttpInfo($listId) * * Delete a list * - * @param int $listId Id of the list (required) + * @param int $list_id Id of the list (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteListAsync($listId) + public function deleteListAsync($list_id) { - return $this->deleteListAsyncWithHttpInfo($listId) + return $this->deleteListAsyncWithHttpInfo($list_id) ->then( function ($response) { return $response[0]; @@ -2689,15 +2644,15 @@ function ($response) { * * Delete a list * - * @param int $listId Id of the list (required) + * @param int $list_id Id of the list (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteListAsyncWithHttpInfo($listId) + public function deleteListAsyncWithHttpInfo($list_id) { $returnType = ''; - $request = $this->deleteListRequest($listId); + $request = $this->deleteListRequest($list_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2725,17 +2680,17 @@ function ($exception) { /** * Create request for operation 'deleteList' * - * @param int $listId Id of the list (required) + * @param int $list_id Id of the list (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function deleteListRequest($listId) + protected function deleteListRequest($list_id) { - // verify the required parameter 'listId' is set - if ($listId === null || (is_array($listId) && count($listId) === 0)) { + // verify the required parameter 'list_id' is set + if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $listId when calling deleteList' + 'Missing the required parameter $list_id when calling deleteList' ); } @@ -2748,10 +2703,10 @@ protected function deleteListRequest($listId) // path params - if ($listId !== null) { + if ($list_id !== null) { $resourcePath = str_replace( '{' . 'listId' . '}', - ObjectSerializer::toPathValue($listId), + ObjectSerializer::toPathValue($list_id), $resourcePath ); } @@ -2811,11 +2766,6 @@ protected function deleteListRequest($listId) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -3071,11 +3021,6 @@ protected function getAttributesRequest() if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -3102,17 +3047,15 @@ protected function getAttributesRequest() * * Get a contact's details * - * @param string $identifier Email (urlencoded) OR ID of the contact OR its SMS attribute value (required) - * @param object $startDate **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional) - * @param object $endDate **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. (optional) + * @param string $email Email (urlencoded) of the contact OR its SMS attribute value (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\GetExtendedContactDetails */ - public function getContactInfo($identifier, $startDate = null, $endDate = null) + public function getContactInfo($email) { - list($response) = $this->getContactInfoWithHttpInfo($identifier, $startDate, $endDate); + list($response) = $this->getContactInfoWithHttpInfo($email); return $response; } @@ -3121,18 +3064,16 @@ public function getContactInfo($identifier, $startDate = null, $endDate = null) * * Get a contact's details * - * @param string $identifier Email (urlencoded) OR ID of the contact OR its SMS attribute value (required) - * @param object $startDate **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional) - * @param object $endDate **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. (optional) + * @param string $email Email (urlencoded) of the contact OR its SMS attribute value (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\GetExtendedContactDetails, HTTP status code, HTTP response headers (array of strings) */ - public function getContactInfoWithHttpInfo($identifier, $startDate = null, $endDate = null) + public function getContactInfoWithHttpInfo($email) { $returnType = '\SendinBlue\Client\Model\GetExtendedContactDetails'; - $request = $this->getContactInfoRequest($identifier, $startDate, $endDate); + $request = $this->getContactInfoRequest($email); try { $options = $this->createHttpClientOption(); @@ -3188,7 +3129,7 @@ public function getContactInfoWithHttpInfo($identifier, $startDate = null, $endD ); $e->setResponseObject($data); break; - case 400: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -3196,7 +3137,7 @@ public function getContactInfoWithHttpInfo($identifier, $startDate = null, $endD ); $e->setResponseObject($data); break; - case 404: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -3214,16 +3155,14 @@ public function getContactInfoWithHttpInfo($identifier, $startDate = null, $endD * * Get a contact's details * - * @param string $identifier Email (urlencoded) OR ID of the contact OR its SMS attribute value (required) - * @param object $startDate **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional) - * @param object $endDate **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. (optional) + * @param string $email Email (urlencoded) of the contact OR its SMS attribute value (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getContactInfoAsync($identifier, $startDate = null, $endDate = null) + public function getContactInfoAsync($email) { - return $this->getContactInfoAsyncWithHttpInfo($identifier, $startDate, $endDate) + return $this->getContactInfoAsyncWithHttpInfo($email) ->then( function ($response) { return $response[0]; @@ -3236,17 +3175,15 @@ function ($response) { * * Get a contact's details * - * @param string $identifier Email (urlencoded) OR ID of the contact OR its SMS attribute value (required) - * @param object $startDate **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional) - * @param object $endDate **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. (optional) + * @param string $email Email (urlencoded) of the contact OR its SMS attribute value (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getContactInfoAsyncWithHttpInfo($identifier, $startDate = null, $endDate = null) + public function getContactInfoAsyncWithHttpInfo($email) { $returnType = '\SendinBlue\Client\Model\GetExtendedContactDetails'; - $request = $this->getContactInfoRequest($identifier, $startDate, $endDate); + $request = $this->getContactInfoRequest($email); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3288,43 +3225,33 @@ function ($exception) { /** * Create request for operation 'getContactInfo' * - * @param string $identifier Email (urlencoded) OR ID of the contact OR its SMS attribute value (required) - * @param object $startDate **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional) - * @param object $endDate **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. (optional) + * @param string $email Email (urlencoded) of the contact OR its SMS attribute value (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getContactInfoRequest($identifier, $startDate = null, $endDate = null) + protected function getContactInfoRequest($email) { - // verify the required parameter 'identifier' is set - if ($identifier === null || (is_array($identifier) && count($identifier) === 0)) { + // verify the required parameter 'email' is set + if ($email === null || (is_array($email) && count($email) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $identifier when calling getContactInfo' + 'Missing the required parameter $email when calling getContactInfo' ); } - $resourcePath = '/contacts/{identifier}'; + $resourcePath = '/contacts/{email}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if ($startDate !== null) { - $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); - } - // query params - if ($endDate !== null) { - $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); - } // path params - if ($identifier !== null) { + if ($email !== null) { $resourcePath = str_replace( - '{' . 'identifier' . '}', - ObjectSerializer::toPathValue($identifier), + '{' . 'email' . '}', + ObjectSerializer::toPathValue($email), $resourcePath ); } @@ -3384,11 +3311,6 @@ protected function getContactInfoRequest($identifier, $startDate = null, $endDat if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -3415,17 +3337,17 @@ protected function getContactInfoRequest($identifier, $startDate = null, $endDat * * Get email campaigns' statistics for a contact * - * @param string $identifier Email (urlencoded) OR ID of the contact (required) - * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional) - * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Maximum difference between startDate and endDate should not be greater than 90 days (optional) + * @param string $email Email address (urlencoded) of the contact (required) + * @param \DateTime $start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional) + * @param \DateTime $end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate (optional) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\GetContactCampaignStats */ - public function getContactStats($identifier, $startDate = null, $endDate = null) + public function getContactStats($email, $start_date = null, $end_date = null) { - list($response) = $this->getContactStatsWithHttpInfo($identifier, $startDate, $endDate); + list($response) = $this->getContactStatsWithHttpInfo($email, $start_date, $end_date); return $response; } @@ -3434,18 +3356,18 @@ public function getContactStats($identifier, $startDate = null, $endDate = null) * * Get email campaigns' statistics for a contact * - * @param string $identifier Email (urlencoded) OR ID of the contact (required) - * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional) - * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Maximum difference between startDate and endDate should not be greater than 90 days (optional) + * @param string $email Email address (urlencoded) of the contact (required) + * @param \DateTime $start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional) + * @param \DateTime $end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate (optional) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\GetContactCampaignStats, HTTP status code, HTTP response headers (array of strings) */ - public function getContactStatsWithHttpInfo($identifier, $startDate = null, $endDate = null) + public function getContactStatsWithHttpInfo($email, $start_date = null, $end_date = null) { $returnType = '\SendinBlue\Client\Model\GetContactCampaignStats'; - $request = $this->getContactStatsRequest($identifier, $startDate, $endDate); + $request = $this->getContactStatsRequest($email, $start_date, $end_date); try { $options = $this->createHttpClientOption(); @@ -3501,7 +3423,7 @@ public function getContactStatsWithHttpInfo($identifier, $startDate = null, $end ); $e->setResponseObject($data); break; - case 400: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -3509,7 +3431,7 @@ public function getContactStatsWithHttpInfo($identifier, $startDate = null, $end ); $e->setResponseObject($data); break; - case 404: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -3527,16 +3449,16 @@ public function getContactStatsWithHttpInfo($identifier, $startDate = null, $end * * Get email campaigns' statistics for a contact * - * @param string $identifier Email (urlencoded) OR ID of the contact (required) - * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional) - * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Maximum difference between startDate and endDate should not be greater than 90 days (optional) + * @param string $email Email address (urlencoded) of the contact (required) + * @param \DateTime $start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional) + * @param \DateTime $end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getContactStatsAsync($identifier, $startDate = null, $endDate = null) + public function getContactStatsAsync($email, $start_date = null, $end_date = null) { - return $this->getContactStatsAsyncWithHttpInfo($identifier, $startDate, $endDate) + return $this->getContactStatsAsyncWithHttpInfo($email, $start_date, $end_date) ->then( function ($response) { return $response[0]; @@ -3549,17 +3471,17 @@ function ($response) { * * Get email campaigns' statistics for a contact * - * @param string $identifier Email (urlencoded) OR ID of the contact (required) - * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional) - * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Maximum difference between startDate and endDate should not be greater than 90 days (optional) + * @param string $email Email address (urlencoded) of the contact (required) + * @param \DateTime $start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional) + * @param \DateTime $end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getContactStatsAsyncWithHttpInfo($identifier, $startDate = null, $endDate = null) + public function getContactStatsAsyncWithHttpInfo($email, $start_date = null, $end_date = null) { $returnType = '\SendinBlue\Client\Model\GetContactCampaignStats'; - $request = $this->getContactStatsRequest($identifier, $startDate, $endDate); + $request = $this->getContactStatsRequest($email, $start_date, $end_date); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3601,23 +3523,23 @@ function ($exception) { /** * Create request for operation 'getContactStats' * - * @param string $identifier Email (urlencoded) OR ID of the contact (required) - * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional) - * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Maximum difference between startDate and endDate should not be greater than 90 days (optional) + * @param string $email Email address (urlencoded) of the contact (required) + * @param \DateTime $start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional) + * @param \DateTime $end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getContactStatsRequest($identifier, $startDate = null, $endDate = null) + protected function getContactStatsRequest($email, $start_date = null, $end_date = null) { - // verify the required parameter 'identifier' is set - if ($identifier === null || (is_array($identifier) && count($identifier) === 0)) { + // verify the required parameter 'email' is set + if ($email === null || (is_array($email) && count($email) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $identifier when calling getContactStats' + 'Missing the required parameter $email when calling getContactStats' ); } - $resourcePath = '/contacts/{identifier}/campaignStats'; + $resourcePath = '/contacts/{email}/campaignStats'; $formParams = []; $queryParams = []; $headerParams = []; @@ -3625,19 +3547,19 @@ protected function getContactStatsRequest($identifier, $startDate = null, $endDa $multipart = false; // query params - if ($startDate !== null) { - $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); + if ($start_date !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($start_date); } // query params - if ($endDate !== null) { - $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); + if ($end_date !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($end_date); } // path params - if ($identifier !== null) { + if ($email !== null) { $resourcePath = str_replace( - '{' . 'identifier' . '}', - ObjectSerializer::toPathValue($identifier), + '{' . 'email' . '}', + ObjectSerializer::toPathValue($email), $resourcePath ); } @@ -3697,11 +3619,6 @@ protected function getContactStatsRequest($identifier, $startDate = null, $endDa if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -3730,16 +3647,16 @@ protected function getContactStatsRequest($identifier, $startDate = null, $endDa * * @param int $limit Number of documents per page (optional, default to 50) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param \DateTime $modified_since Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\GetContacts */ - public function getContacts($limit = '50', $offset = '0', $modifiedSince = null, $sort = 'desc') + public function getContacts($limit = '50', $offset = '0', $modified_since = null, $sort = 'desc') { - list($response) = $this->getContactsWithHttpInfo($limit, $offset, $modifiedSince, $sort); + list($response) = $this->getContactsWithHttpInfo($limit, $offset, $modified_since, $sort); return $response; } @@ -3750,17 +3667,17 @@ public function getContacts($limit = '50', $offset = '0', $modifiedSince = null, * * @param int $limit Number of documents per page (optional, default to 50) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param \DateTime $modified_since Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\GetContacts, HTTP status code, HTTP response headers (array of strings) */ - public function getContactsWithHttpInfo($limit = '50', $offset = '0', $modifiedSince = null, $sort = 'desc') + public function getContactsWithHttpInfo($limit = '50', $offset = '0', $modified_since = null, $sort = 'desc') { $returnType = '\SendinBlue\Client\Model\GetContacts'; - $request = $this->getContactsRequest($limit, $offset, $modifiedSince, $sort); + $request = $this->getContactsRequest($limit, $offset, $modified_since, $sort); try { $options = $this->createHttpClientOption(); @@ -3836,15 +3753,15 @@ public function getContactsWithHttpInfo($limit = '50', $offset = '0', $modifiedS * * @param int $limit Number of documents per page (optional, default to 50) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param \DateTime $modified_since Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getContactsAsync($limit = '50', $offset = '0', $modifiedSince = null, $sort = 'desc') + public function getContactsAsync($limit = '50', $offset = '0', $modified_since = null, $sort = 'desc') { - return $this->getContactsAsyncWithHttpInfo($limit, $offset, $modifiedSince, $sort) + return $this->getContactsAsyncWithHttpInfo($limit, $offset, $modified_since, $sort) ->then( function ($response) { return $response[0]; @@ -3859,16 +3776,16 @@ function ($response) { * * @param int $limit Number of documents per page (optional, default to 50) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param \DateTime $modified_since Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getContactsAsyncWithHttpInfo($limit = '50', $offset = '0', $modifiedSince = null, $sort = 'desc') + public function getContactsAsyncWithHttpInfo($limit = '50', $offset = '0', $modified_since = null, $sort = 'desc') { $returnType = '\SendinBlue\Client\Model\GetContacts'; - $request = $this->getContactsRequest($limit, $offset, $modifiedSince, $sort); + $request = $this->getContactsRequest($limit, $offset, $modified_since, $sort); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3912,13 +3829,13 @@ function ($exception) { * * @param int $limit Number of documents per page (optional, default to 50) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param \DateTime $modified_since Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getContactsRequest($limit = '50', $offset = '0', $modifiedSince = null, $sort = 'desc') + protected function getContactsRequest($limit = '50', $offset = '0', $modified_since = null, $sort = 'desc') { if ($limit !== null && $limit > 1000) { throw new \InvalidArgumentException('invalid value for "$limit" when calling ContactsApi.getContacts, must be smaller than or equal to 1000.'); @@ -3941,8 +3858,8 @@ protected function getContactsRequest($limit = '50', $offset = '0', $modifiedSin $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); } // query params - if ($modifiedSince !== null) { - $queryParams['modifiedSince'] = ObjectSerializer::toQueryValue($modifiedSince); + if ($modified_since !== null) { + $queryParams['modifiedSince'] = ObjectSerializer::toQueryValue($modified_since); } // query params if ($sort !== null) { @@ -4005,11 +3922,6 @@ protected function getContactsRequest($limit = '50', $offset = '0', $modifiedSin if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -4036,19 +3948,19 @@ protected function getContactsRequest($limit = '50', $offset = '0', $modifiedSin * * Get contacts in a list * - * @param int $listId Id of the list (required) - * @param string $modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param int $list_id Id of the list (required) + * @param \DateTime $modified_since Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) * @param int $limit Number of documents per page (optional, default to 50) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\GetContacts */ - public function getContactsFromList($listId, $modifiedSince = null, $limit = '50', $offset = '0', $sort = 'desc') + public function getContactsFromList($list_id, $modified_since = null, $limit = '50', $offset = '0', $sort = 'desc') { - list($response) = $this->getContactsFromListWithHttpInfo($listId, $modifiedSince, $limit, $offset, $sort); + list($response) = $this->getContactsFromListWithHttpInfo($list_id, $modified_since, $limit, $offset, $sort); return $response; } @@ -4057,20 +3969,20 @@ public function getContactsFromList($listId, $modifiedSince = null, $limit = '50 * * Get contacts in a list * - * @param int $listId Id of the list (required) - * @param string $modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param int $list_id Id of the list (required) + * @param \DateTime $modified_since Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) * @param int $limit Number of documents per page (optional, default to 50) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\GetContacts, HTTP status code, HTTP response headers (array of strings) */ - public function getContactsFromListWithHttpInfo($listId, $modifiedSince = null, $limit = '50', $offset = '0', $sort = 'desc') + public function getContactsFromListWithHttpInfo($list_id, $modified_since = null, $limit = '50', $offset = '0', $sort = 'desc') { $returnType = '\SendinBlue\Client\Model\GetContacts'; - $request = $this->getContactsFromListRequest($listId, $modifiedSince, $limit, $offset, $sort); + $request = $this->getContactsFromListRequest($list_id, $modified_since, $limit, $offset, $sort); try { $options = $this->createHttpClientOption(); @@ -4152,18 +4064,18 @@ public function getContactsFromListWithHttpInfo($listId, $modifiedSince = null, * * Get contacts in a list * - * @param int $listId Id of the list (required) - * @param string $modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param int $list_id Id of the list (required) + * @param \DateTime $modified_since Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) * @param int $limit Number of documents per page (optional, default to 50) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getContactsFromListAsync($listId, $modifiedSince = null, $limit = '50', $offset = '0', $sort = 'desc') + public function getContactsFromListAsync($list_id, $modified_since = null, $limit = '50', $offset = '0', $sort = 'desc') { - return $this->getContactsFromListAsyncWithHttpInfo($listId, $modifiedSince, $limit, $offset, $sort) + return $this->getContactsFromListAsyncWithHttpInfo($list_id, $modified_since, $limit, $offset, $sort) ->then( function ($response) { return $response[0]; @@ -4176,19 +4088,19 @@ function ($response) { * * Get contacts in a list * - * @param int $listId Id of the list (required) - * @param string $modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param int $list_id Id of the list (required) + * @param \DateTime $modified_since Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) * @param int $limit Number of documents per page (optional, default to 50) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getContactsFromListAsyncWithHttpInfo($listId, $modifiedSince = null, $limit = '50', $offset = '0', $sort = 'desc') + public function getContactsFromListAsyncWithHttpInfo($list_id, $modified_since = null, $limit = '50', $offset = '0', $sort = 'desc') { $returnType = '\SendinBlue\Client\Model\GetContacts'; - $request = $this->getContactsFromListRequest($listId, $modifiedSince, $limit, $offset, $sort); + $request = $this->getContactsFromListRequest($list_id, $modified_since, $limit, $offset, $sort); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4230,21 +4142,21 @@ function ($exception) { /** * Create request for operation 'getContactsFromList' * - * @param int $listId Id of the list (required) - * @param string $modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param int $list_id Id of the list (required) + * @param \DateTime $modified_since Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) * @param int $limit Number of documents per page (optional, default to 50) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getContactsFromListRequest($listId, $modifiedSince = null, $limit = '50', $offset = '0', $sort = 'desc') + protected function getContactsFromListRequest($list_id, $modified_since = null, $limit = '50', $offset = '0', $sort = 'desc') { - // verify the required parameter 'listId' is set - if ($listId === null || (is_array($listId) && count($listId) === 0)) { + // verify the required parameter 'list_id' is set + if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $listId when calling getContactsFromList' + 'Missing the required parameter $list_id when calling getContactsFromList' ); } if ($limit !== null && $limit > 500) { @@ -4260,8 +4172,8 @@ protected function getContactsFromListRequest($listId, $modifiedSince = null, $l $multipart = false; // query params - if ($modifiedSince !== null) { - $queryParams['modifiedSince'] = ObjectSerializer::toQueryValue($modifiedSince); + if ($modified_since !== null) { + $queryParams['modifiedSince'] = ObjectSerializer::toQueryValue($modified_since); } // query params if ($limit !== null) { @@ -4277,10 +4189,10 @@ protected function getContactsFromListRequest($listId, $modifiedSince = null, $l } // path params - if ($listId !== null) { + if ($list_id !== null) { $resourcePath = str_replace( '{' . 'listId' . '}', - ObjectSerializer::toPathValue($listId), + ObjectSerializer::toPathValue($list_id), $resourcePath ); } @@ -4340,11 +4252,6 @@ protected function getContactsFromListRequest($listId, $modifiedSince = null, $l if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -4371,15 +4278,15 @@ protected function getContactsFromListRequest($listId, $modifiedSince = null, $l * * Returns a folder's details * - * @param int $folderId id of the folder (required) + * @param int $folder_id id of the folder (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\GetFolder */ - public function getFolder($folderId) + public function getFolder($folder_id) { - list($response) = $this->getFolderWithHttpInfo($folderId); + list($response) = $this->getFolderWithHttpInfo($folder_id); return $response; } @@ -4388,16 +4295,16 @@ public function getFolder($folderId) * * Returns a folder's details * - * @param int $folderId id of the folder (required) + * @param int $folder_id id of the folder (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\GetFolder, HTTP status code, HTTP response headers (array of strings) */ - public function getFolderWithHttpInfo($folderId) + public function getFolderWithHttpInfo($folder_id) { $returnType = '\SendinBlue\Client\Model\GetFolder'; - $request = $this->getFolderRequest($folderId); + $request = $this->getFolderRequest($folder_id); try { $options = $this->createHttpClientOption(); @@ -4453,7 +4360,7 @@ public function getFolderWithHttpInfo($folderId) ); $e->setResponseObject($data); break; - case 400: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -4461,7 +4368,7 @@ public function getFolderWithHttpInfo($folderId) ); $e->setResponseObject($data); break; - case 404: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -4479,14 +4386,14 @@ public function getFolderWithHttpInfo($folderId) * * Returns a folder's details * - * @param int $folderId id of the folder (required) + * @param int $folder_id id of the folder (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getFolderAsync($folderId) + public function getFolderAsync($folder_id) { - return $this->getFolderAsyncWithHttpInfo($folderId) + return $this->getFolderAsyncWithHttpInfo($folder_id) ->then( function ($response) { return $response[0]; @@ -4499,15 +4406,15 @@ function ($response) { * * Returns a folder's details * - * @param int $folderId id of the folder (required) + * @param int $folder_id id of the folder (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getFolderAsyncWithHttpInfo($folderId) + public function getFolderAsyncWithHttpInfo($folder_id) { $returnType = '\SendinBlue\Client\Model\GetFolder'; - $request = $this->getFolderRequest($folderId); + $request = $this->getFolderRequest($folder_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4549,17 +4456,17 @@ function ($exception) { /** * Create request for operation 'getFolder' * - * @param int $folderId id of the folder (required) + * @param int $folder_id id of the folder (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getFolderRequest($folderId) + protected function getFolderRequest($folder_id) { - // verify the required parameter 'folderId' is set - if ($folderId === null || (is_array($folderId) && count($folderId) === 0)) { + // verify the required parameter 'folder_id' is set + if ($folder_id === null || (is_array($folder_id) && count($folder_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $folderId when calling getFolder' + 'Missing the required parameter $folder_id when calling getFolder' ); } @@ -4572,10 +4479,10 @@ protected function getFolderRequest($folderId) // path params - if ($folderId !== null) { + if ($folder_id !== null) { $resourcePath = str_replace( '{' . 'folderId' . '}', - ObjectSerializer::toPathValue($folderId), + ObjectSerializer::toPathValue($folder_id), $resourcePath ); } @@ -4635,11 +4542,6 @@ protected function getFolderRequest($folderId) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -4666,18 +4568,18 @@ protected function getFolderRequest($folderId) * * Get lists in a folder * - * @param int $folderId Id of the folder (required) + * @param int $folder_id Id of the folder (required) * @param int $limit Number of documents per page (optional, default to 10) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\GetFolderLists */ - public function getFolderLists($folderId, $limit = '10', $offset = '0', $sort = 'desc') + public function getFolderLists($folder_id, $limit = '10', $offset = '0', $sort = 'desc') { - list($response) = $this->getFolderListsWithHttpInfo($folderId, $limit, $offset, $sort); + list($response) = $this->getFolderListsWithHttpInfo($folder_id, $limit, $offset, $sort); return $response; } @@ -4686,19 +4588,19 @@ public function getFolderLists($folderId, $limit = '10', $offset = '0', $sort = * * Get lists in a folder * - * @param int $folderId Id of the folder (required) + * @param int $folder_id Id of the folder (required) * @param int $limit Number of documents per page (optional, default to 10) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\GetFolderLists, HTTP status code, HTTP response headers (array of strings) */ - public function getFolderListsWithHttpInfo($folderId, $limit = '10', $offset = '0', $sort = 'desc') + public function getFolderListsWithHttpInfo($folder_id, $limit = '10', $offset = '0', $sort = 'desc') { $returnType = '\SendinBlue\Client\Model\GetFolderLists'; - $request = $this->getFolderListsRequest($folderId, $limit, $offset, $sort); + $request = $this->getFolderListsRequest($folder_id, $limit, $offset, $sort); try { $options = $this->createHttpClientOption(); @@ -4754,7 +4656,7 @@ public function getFolderListsWithHttpInfo($folderId, $limit = '10', $offset = ' ); $e->setResponseObject($data); break; - case 400: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -4762,7 +4664,7 @@ public function getFolderListsWithHttpInfo($folderId, $limit = '10', $offset = ' ); $e->setResponseObject($data); break; - case 404: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -4780,17 +4682,17 @@ public function getFolderListsWithHttpInfo($folderId, $limit = '10', $offset = ' * * Get lists in a folder * - * @param int $folderId Id of the folder (required) + * @param int $folder_id Id of the folder (required) * @param int $limit Number of documents per page (optional, default to 10) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getFolderListsAsync($folderId, $limit = '10', $offset = '0', $sort = 'desc') + public function getFolderListsAsync($folder_id, $limit = '10', $offset = '0', $sort = 'desc') { - return $this->getFolderListsAsyncWithHttpInfo($folderId, $limit, $offset, $sort) + return $this->getFolderListsAsyncWithHttpInfo($folder_id, $limit, $offset, $sort) ->then( function ($response) { return $response[0]; @@ -4803,18 +4705,18 @@ function ($response) { * * Get lists in a folder * - * @param int $folderId Id of the folder (required) + * @param int $folder_id Id of the folder (required) * @param int $limit Number of documents per page (optional, default to 10) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getFolderListsAsyncWithHttpInfo($folderId, $limit = '10', $offset = '0', $sort = 'desc') + public function getFolderListsAsyncWithHttpInfo($folder_id, $limit = '10', $offset = '0', $sort = 'desc') { $returnType = '\SendinBlue\Client\Model\GetFolderLists'; - $request = $this->getFolderListsRequest($folderId, $limit, $offset, $sort); + $request = $this->getFolderListsRequest($folder_id, $limit, $offset, $sort); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4856,20 +4758,20 @@ function ($exception) { /** * Create request for operation 'getFolderLists' * - * @param int $folderId Id of the folder (required) + * @param int $folder_id Id of the folder (required) * @param int $limit Number of documents per page (optional, default to 10) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getFolderListsRequest($folderId, $limit = '10', $offset = '0', $sort = 'desc') + protected function getFolderListsRequest($folder_id, $limit = '10', $offset = '0', $sort = 'desc') { - // verify the required parameter 'folderId' is set - if ($folderId === null || (is_array($folderId) && count($folderId) === 0)) { + // verify the required parameter 'folder_id' is set + if ($folder_id === null || (is_array($folder_id) && count($folder_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $folderId when calling getFolderLists' + 'Missing the required parameter $folder_id when calling getFolderLists' ); } if ($limit !== null && $limit > 50) { @@ -4898,10 +4800,10 @@ protected function getFolderListsRequest($folderId, $limit = '10', $offset = '0' } // path params - if ($folderId !== null) { + if ($folder_id !== null) { $resourcePath = str_replace( '{' . 'folderId' . '}', - ObjectSerializer::toPathValue($folderId), + ObjectSerializer::toPathValue($folder_id), $resourcePath ); } @@ -4961,11 +4863,6 @@ protected function getFolderListsRequest($folderId, $limit = '10', $offset = '0' if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -4994,7 +4891,7 @@ protected function getFolderListsRequest($folderId, $limit = '10', $offset = '0' * * @param int $limit Number of documents per page (required) * @param int $offset Index of the first document of the page (required) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -5013,7 +4910,7 @@ public function getFolders($limit, $offset, $sort = 'desc') * * @param int $limit Number of documents per page (required) * @param int $offset Index of the first document of the page (required) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -5098,7 +4995,7 @@ public function getFoldersWithHttpInfo($limit, $offset, $sort = 'desc') * * @param int $limit Number of documents per page (required) * @param int $offset Index of the first document of the page (required) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -5120,7 +5017,7 @@ function ($response) { * * @param int $limit Number of documents per page (required) * @param int $offset Index of the first document of the page (required) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -5172,7 +5069,7 @@ function ($exception) { * * @param int $limit Number of documents per page (required) * @param int $offset Index of the first document of the page (required) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -5272,11 +5169,6 @@ protected function getFoldersRequest($limit, $offset, $sort = 'desc') if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -5303,15 +5195,15 @@ protected function getFoldersRequest($limit, $offset, $sort = 'desc') * * Get a list's details * - * @param int $listId Id of the list (required) + * @param int $list_id Id of the list (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\GetExtendedList */ - public function getList($listId) + public function getList($list_id) { - list($response) = $this->getListWithHttpInfo($listId); + list($response) = $this->getListWithHttpInfo($list_id); return $response; } @@ -5320,16 +5212,16 @@ public function getList($listId) * * Get a list's details * - * @param int $listId Id of the list (required) + * @param int $list_id Id of the list (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\GetExtendedList, HTTP status code, HTTP response headers (array of strings) */ - public function getListWithHttpInfo($listId) + public function getListWithHttpInfo($list_id) { $returnType = '\SendinBlue\Client\Model\GetExtendedList'; - $request = $this->getListRequest($listId); + $request = $this->getListRequest($list_id); try { $options = $this->createHttpClientOption(); @@ -5385,7 +5277,7 @@ public function getListWithHttpInfo($listId) ); $e->setResponseObject($data); break; - case 400: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -5393,7 +5285,7 @@ public function getListWithHttpInfo($listId) ); $e->setResponseObject($data); break; - case 404: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -5411,14 +5303,14 @@ public function getListWithHttpInfo($listId) * * Get a list's details * - * @param int $listId Id of the list (required) + * @param int $list_id Id of the list (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getListAsync($listId) + public function getListAsync($list_id) { - return $this->getListAsyncWithHttpInfo($listId) + return $this->getListAsyncWithHttpInfo($list_id) ->then( function ($response) { return $response[0]; @@ -5431,15 +5323,15 @@ function ($response) { * * Get a list's details * - * @param int $listId Id of the list (required) + * @param int $list_id Id of the list (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getListAsyncWithHttpInfo($listId) + public function getListAsyncWithHttpInfo($list_id) { $returnType = '\SendinBlue\Client\Model\GetExtendedList'; - $request = $this->getListRequest($listId); + $request = $this->getListRequest($list_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5481,17 +5373,17 @@ function ($exception) { /** * Create request for operation 'getList' * - * @param int $listId Id of the list (required) + * @param int $list_id Id of the list (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getListRequest($listId) + protected function getListRequest($list_id) { - // verify the required parameter 'listId' is set - if ($listId === null || (is_array($listId) && count($listId) === 0)) { + // verify the required parameter 'list_id' is set + if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $listId when calling getList' + 'Missing the required parameter $list_id when calling getList' ); } @@ -5504,10 +5396,10 @@ protected function getListRequest($listId) // path params - if ($listId !== null) { + if ($list_id !== null) { $resourcePath = str_replace( '{' . 'listId' . '}', - ObjectSerializer::toPathValue($listId), + ObjectSerializer::toPathValue($list_id), $resourcePath ); } @@ -5567,11 +5459,6 @@ protected function getListRequest($listId) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -5600,7 +5487,7 @@ protected function getListRequest($listId) * * @param int $limit Number of documents per page (optional, default to 10) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -5619,7 +5506,7 @@ public function getLists($limit = '10', $offset = '0', $sort = 'desc') * * @param int $limit Number of documents per page (optional, default to 10) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -5704,7 +5591,7 @@ public function getListsWithHttpInfo($limit = '10', $offset = '0', $sort = 'desc * * @param int $limit Number of documents per page (optional, default to 10) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -5726,7 +5613,7 @@ function ($response) { * * @param int $limit Number of documents per page (optional, default to 10) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -5778,7 +5665,7 @@ function ($exception) { * * @param int $limit Number of documents per page (optional, default to 10) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -5866,11 +5753,6 @@ protected function getListsRequest($limit = '10', $offset = '0', $sort = 'desc') if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -5897,15 +5779,15 @@ protected function getListsRequest($limit = '10', $offset = '0', $sort = 'desc') * * Import contacts * - * @param \SendinBlue\Client\Model\RequestContactImport $requestContactImport Values to import contacts in Sendinblue. To know more about the expected format, please have a look at ``https://help.sendinblue.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` (required) + * @param \SendinBlue\Client\Model\RequestContactImport $request_contact_import Values to import contacts in Sendinblue. To know more about the expected format, please have a look at ``https://help.sendinblue.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\CreatedProcessId */ - public function importContacts($requestContactImport) + public function importContacts($request_contact_import) { - list($response) = $this->importContactsWithHttpInfo($requestContactImport); + list($response) = $this->importContactsWithHttpInfo($request_contact_import); return $response; } @@ -5914,16 +5796,16 @@ public function importContacts($requestContactImport) * * Import contacts * - * @param \SendinBlue\Client\Model\RequestContactImport $requestContactImport Values to import contacts in Sendinblue. To know more about the expected format, please have a look at ``https://help.sendinblue.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` (required) + * @param \SendinBlue\Client\Model\RequestContactImport $request_contact_import Values to import contacts in Sendinblue. To know more about the expected format, please have a look at ``https://help.sendinblue.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\CreatedProcessId, HTTP status code, HTTP response headers (array of strings) */ - public function importContactsWithHttpInfo($requestContactImport) + public function importContactsWithHttpInfo($request_contact_import) { $returnType = '\SendinBlue\Client\Model\CreatedProcessId'; - $request = $this->importContactsRequest($requestContactImport); + $request = $this->importContactsRequest($request_contact_import); try { $options = $this->createHttpClientOption(); @@ -5997,14 +5879,14 @@ public function importContactsWithHttpInfo($requestContactImport) * * Import contacts * - * @param \SendinBlue\Client\Model\RequestContactImport $requestContactImport Values to import contacts in Sendinblue. To know more about the expected format, please have a look at ``https://help.sendinblue.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` (required) + * @param \SendinBlue\Client\Model\RequestContactImport $request_contact_import Values to import contacts in Sendinblue. To know more about the expected format, please have a look at ``https://help.sendinblue.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function importContactsAsync($requestContactImport) + public function importContactsAsync($request_contact_import) { - return $this->importContactsAsyncWithHttpInfo($requestContactImport) + return $this->importContactsAsyncWithHttpInfo($request_contact_import) ->then( function ($response) { return $response[0]; @@ -6017,15 +5899,15 @@ function ($response) { * * Import contacts * - * @param \SendinBlue\Client\Model\RequestContactImport $requestContactImport Values to import contacts in Sendinblue. To know more about the expected format, please have a look at ``https://help.sendinblue.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` (required) + * @param \SendinBlue\Client\Model\RequestContactImport $request_contact_import Values to import contacts in Sendinblue. To know more about the expected format, please have a look at ``https://help.sendinblue.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function importContactsAsyncWithHttpInfo($requestContactImport) + public function importContactsAsyncWithHttpInfo($request_contact_import) { $returnType = '\SendinBlue\Client\Model\CreatedProcessId'; - $request = $this->importContactsRequest($requestContactImport); + $request = $this->importContactsRequest($request_contact_import); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6067,17 +5949,17 @@ function ($exception) { /** * Create request for operation 'importContacts' * - * @param \SendinBlue\Client\Model\RequestContactImport $requestContactImport Values to import contacts in Sendinblue. To know more about the expected format, please have a look at ``https://help.sendinblue.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` (required) + * @param \SendinBlue\Client\Model\RequestContactImport $request_contact_import Values to import contacts in Sendinblue. To know more about the expected format, please have a look at ``https://help.sendinblue.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function importContactsRequest($requestContactImport) + protected function importContactsRequest($request_contact_import) { - // verify the required parameter 'requestContactImport' is set - if ($requestContactImport === null || (is_array($requestContactImport) && count($requestContactImport) === 0)) { + // verify the required parameter 'request_contact_import' is set + if ($request_contact_import === null || (is_array($request_contact_import) && count($request_contact_import) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $requestContactImport when calling importContacts' + 'Missing the required parameter $request_contact_import when calling importContacts' ); } @@ -6092,8 +5974,8 @@ protected function importContactsRequest($requestContactImport) // body params $_tempBody = null; - if (isset($requestContactImport)) { - $_tempBody = $requestContactImport; + if (isset($request_contact_import)) { + $_tempBody = $request_contact_import; } if ($multipart) { @@ -6148,11 +6030,6 @@ protected function importContactsRequest($requestContactImport) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -6179,16 +6056,16 @@ protected function importContactsRequest($requestContactImport) * * Delete a contact from a list * - * @param int $listId Id of the list (required) - * @param \SendinBlue\Client\Model\RemoveContactFromList $contactEmails Emails addresses OR IDs of the contacts (required) + * @param int $list_id Id of the list (required) + * @param \SendinBlue\Client\Model\RemoveContactFromList $contact_emails Emails adresses of the contact (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\PostContactInfo */ - public function removeContactFromList($listId, $contactEmails) + public function removeContactFromList($list_id, $contact_emails) { - list($response) = $this->removeContactFromListWithHttpInfo($listId, $contactEmails); + list($response) = $this->removeContactFromListWithHttpInfo($list_id, $contact_emails); return $response; } @@ -6197,17 +6074,17 @@ public function removeContactFromList($listId, $contactEmails) * * Delete a contact from a list * - * @param int $listId Id of the list (required) - * @param \SendinBlue\Client\Model\RemoveContactFromList $contactEmails Emails addresses OR IDs of the contacts (required) + * @param int $list_id Id of the list (required) + * @param \SendinBlue\Client\Model\RemoveContactFromList $contact_emails Emails adresses of the contact (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\PostContactInfo, HTTP status code, HTTP response headers (array of strings) */ - public function removeContactFromListWithHttpInfo($listId, $contactEmails) + public function removeContactFromListWithHttpInfo($list_id, $contact_emails) { $returnType = '\SendinBlue\Client\Model\PostContactInfo'; - $request = $this->removeContactFromListRequest($listId, $contactEmails); + $request = $this->removeContactFromListRequest($list_id, $contact_emails); try { $options = $this->createHttpClientOption(); @@ -6289,15 +6166,15 @@ public function removeContactFromListWithHttpInfo($listId, $contactEmails) * * Delete a contact from a list * - * @param int $listId Id of the list (required) - * @param \SendinBlue\Client\Model\RemoveContactFromList $contactEmails Emails addresses OR IDs of the contacts (required) + * @param int $list_id Id of the list (required) + * @param \SendinBlue\Client\Model\RemoveContactFromList $contact_emails Emails adresses of the contact (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function removeContactFromListAsync($listId, $contactEmails) + public function removeContactFromListAsync($list_id, $contact_emails) { - return $this->removeContactFromListAsyncWithHttpInfo($listId, $contactEmails) + return $this->removeContactFromListAsyncWithHttpInfo($list_id, $contact_emails) ->then( function ($response) { return $response[0]; @@ -6310,16 +6187,16 @@ function ($response) { * * Delete a contact from a list * - * @param int $listId Id of the list (required) - * @param \SendinBlue\Client\Model\RemoveContactFromList $contactEmails Emails addresses OR IDs of the contacts (required) + * @param int $list_id Id of the list (required) + * @param \SendinBlue\Client\Model\RemoveContactFromList $contact_emails Emails adresses of the contact (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function removeContactFromListAsyncWithHttpInfo($listId, $contactEmails) + public function removeContactFromListAsyncWithHttpInfo($list_id, $contact_emails) { $returnType = '\SendinBlue\Client\Model\PostContactInfo'; - $request = $this->removeContactFromListRequest($listId, $contactEmails); + $request = $this->removeContactFromListRequest($list_id, $contact_emails); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6361,24 +6238,24 @@ function ($exception) { /** * Create request for operation 'removeContactFromList' * - * @param int $listId Id of the list (required) - * @param \SendinBlue\Client\Model\RemoveContactFromList $contactEmails Emails addresses OR IDs of the contacts (required) + * @param int $list_id Id of the list (required) + * @param \SendinBlue\Client\Model\RemoveContactFromList $contact_emails Emails adresses of the contact (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function removeContactFromListRequest($listId, $contactEmails) + protected function removeContactFromListRequest($list_id, $contact_emails) { - // verify the required parameter 'listId' is set - if ($listId === null || (is_array($listId) && count($listId) === 0)) { + // verify the required parameter 'list_id' is set + if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $listId when calling removeContactFromList' + 'Missing the required parameter $list_id when calling removeContactFromList' ); } - // verify the required parameter 'contactEmails' is set - if ($contactEmails === null || (is_array($contactEmails) && count($contactEmails) === 0)) { + // verify the required parameter 'contact_emails' is set + if ($contact_emails === null || (is_array($contact_emails) && count($contact_emails) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $contactEmails when calling removeContactFromList' + 'Missing the required parameter $contact_emails when calling removeContactFromList' ); } @@ -6391,18 +6268,18 @@ protected function removeContactFromListRequest($listId, $contactEmails) // path params - if ($listId !== null) { + if ($list_id !== null) { $resourcePath = str_replace( '{' . 'listId' . '}', - ObjectSerializer::toPathValue($listId), + ObjectSerializer::toPathValue($list_id), $resourcePath ); } // body params $_tempBody = null; - if (isset($contactEmails)) { - $_tempBody = $contactEmails; + if (isset($contact_emails)) { + $_tempBody = $contact_emails; } if ($multipart) { @@ -6457,11 +6334,6 @@ protected function removeContactFromListRequest($listId, $contactEmails) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -6488,15 +6360,15 @@ protected function removeContactFromListRequest($listId, $contactEmails) * * Export contacts * - * @param \SendinBlue\Client\Model\RequestContactExport $requestContactExport Values to request a contact export (required) + * @param \SendinBlue\Client\Model\RequestContactExport $request_contact_export Values to request a contact export (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\CreatedProcessId */ - public function requestContactExport($requestContactExport) + public function requestContactExport($request_contact_export) { - list($response) = $this->requestContactExportWithHttpInfo($requestContactExport); + list($response) = $this->requestContactExportWithHttpInfo($request_contact_export); return $response; } @@ -6505,16 +6377,16 @@ public function requestContactExport($requestContactExport) * * Export contacts * - * @param \SendinBlue\Client\Model\RequestContactExport $requestContactExport Values to request a contact export (required) + * @param \SendinBlue\Client\Model\RequestContactExport $request_contact_export Values to request a contact export (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\CreatedProcessId, HTTP status code, HTTP response headers (array of strings) */ - public function requestContactExportWithHttpInfo($requestContactExport) + public function requestContactExportWithHttpInfo($request_contact_export) { $returnType = '\SendinBlue\Client\Model\CreatedProcessId'; - $request = $this->requestContactExportRequest($requestContactExport); + $request = $this->requestContactExportRequest($request_contact_export); try { $options = $this->createHttpClientOption(); @@ -6588,14 +6460,14 @@ public function requestContactExportWithHttpInfo($requestContactExport) * * Export contacts * - * @param \SendinBlue\Client\Model\RequestContactExport $requestContactExport Values to request a contact export (required) + * @param \SendinBlue\Client\Model\RequestContactExport $request_contact_export Values to request a contact export (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function requestContactExportAsync($requestContactExport) + public function requestContactExportAsync($request_contact_export) { - return $this->requestContactExportAsyncWithHttpInfo($requestContactExport) + return $this->requestContactExportAsyncWithHttpInfo($request_contact_export) ->then( function ($response) { return $response[0]; @@ -6608,15 +6480,15 @@ function ($response) { * * Export contacts * - * @param \SendinBlue\Client\Model\RequestContactExport $requestContactExport Values to request a contact export (required) + * @param \SendinBlue\Client\Model\RequestContactExport $request_contact_export Values to request a contact export (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function requestContactExportAsyncWithHttpInfo($requestContactExport) + public function requestContactExportAsyncWithHttpInfo($request_contact_export) { $returnType = '\SendinBlue\Client\Model\CreatedProcessId'; - $request = $this->requestContactExportRequest($requestContactExport); + $request = $this->requestContactExportRequest($request_contact_export); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6658,17 +6530,17 @@ function ($exception) { /** * Create request for operation 'requestContactExport' * - * @param \SendinBlue\Client\Model\RequestContactExport $requestContactExport Values to request a contact export (required) + * @param \SendinBlue\Client\Model\RequestContactExport $request_contact_export Values to request a contact export (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function requestContactExportRequest($requestContactExport) + protected function requestContactExportRequest($request_contact_export) { - // verify the required parameter 'requestContactExport' is set - if ($requestContactExport === null || (is_array($requestContactExport) && count($requestContactExport) === 0)) { + // verify the required parameter 'request_contact_export' is set + if ($request_contact_export === null || (is_array($request_contact_export) && count($request_contact_export) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $requestContactExport when calling requestContactExport' + 'Missing the required parameter $request_contact_export when calling requestContactExport' ); } @@ -6683,8 +6555,8 @@ protected function requestContactExportRequest($requestContactExport) // body params $_tempBody = null; - if (isset($requestContactExport)) { - $_tempBody = $requestContactExport; + if (isset($request_contact_export)) { + $_tempBody = $request_contact_export; } if ($multipart) { @@ -6739,11 +6611,6 @@ protected function requestContactExportRequest($requestContactExport) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -6770,17 +6637,17 @@ protected function requestContactExportRequest($requestContactExport) * * Update contact attribute * - * @param string $attributeCategory Category of the attribute (required) - * @param string $attributeName Name of the existing attribute (required) - * @param \SendinBlue\Client\Model\UpdateAttribute $updateAttribute Values to update an attribute (required) + * @param string $attribute_category Category of the attribute (required) + * @param string $attribute_name Name of the existing attribute (required) + * @param \SendinBlue\Client\Model\UpdateAttribute $update_attribute Values to update an attribute (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function updateAttribute($attributeCategory, $attributeName, $updateAttribute) + public function updateAttribute($attribute_category, $attribute_name, $update_attribute) { - $this->updateAttributeWithHttpInfo($attributeCategory, $attributeName, $updateAttribute); + $this->updateAttributeWithHttpInfo($attribute_category, $attribute_name, $update_attribute); } /** @@ -6788,18 +6655,18 @@ public function updateAttribute($attributeCategory, $attributeName, $updateAttri * * Update contact attribute * - * @param string $attributeCategory Category of the attribute (required) - * @param string $attributeName Name of the existing attribute (required) - * @param \SendinBlue\Client\Model\UpdateAttribute $updateAttribute Values to update an attribute (required) + * @param string $attribute_category Category of the attribute (required) + * @param string $attribute_name Name of the existing attribute (required) + * @param \SendinBlue\Client\Model\UpdateAttribute $update_attribute Values to update an attribute (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function updateAttributeWithHttpInfo($attributeCategory, $attributeName, $updateAttribute) + public function updateAttributeWithHttpInfo($attribute_category, $attribute_name, $update_attribute) { $returnType = ''; - $request = $this->updateAttributeRequest($attributeCategory, $attributeName, $updateAttribute); + $request = $this->updateAttributeRequest($attribute_category, $attribute_name, $update_attribute); try { $options = $this->createHttpClientOption(); @@ -6859,16 +6726,16 @@ public function updateAttributeWithHttpInfo($attributeCategory, $attributeName, * * Update contact attribute * - * @param string $attributeCategory Category of the attribute (required) - * @param string $attributeName Name of the existing attribute (required) - * @param \SendinBlue\Client\Model\UpdateAttribute $updateAttribute Values to update an attribute (required) + * @param string $attribute_category Category of the attribute (required) + * @param string $attribute_name Name of the existing attribute (required) + * @param \SendinBlue\Client\Model\UpdateAttribute $update_attribute Values to update an attribute (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateAttributeAsync($attributeCategory, $attributeName, $updateAttribute) + public function updateAttributeAsync($attribute_category, $attribute_name, $update_attribute) { - return $this->updateAttributeAsyncWithHttpInfo($attributeCategory, $attributeName, $updateAttribute) + return $this->updateAttributeAsyncWithHttpInfo($attribute_category, $attribute_name, $update_attribute) ->then( function ($response) { return $response[0]; @@ -6881,17 +6748,17 @@ function ($response) { * * Update contact attribute * - * @param string $attributeCategory Category of the attribute (required) - * @param string $attributeName Name of the existing attribute (required) - * @param \SendinBlue\Client\Model\UpdateAttribute $updateAttribute Values to update an attribute (required) + * @param string $attribute_category Category of the attribute (required) + * @param string $attribute_name Name of the existing attribute (required) + * @param \SendinBlue\Client\Model\UpdateAttribute $update_attribute Values to update an attribute (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateAttributeAsyncWithHttpInfo($attributeCategory, $attributeName, $updateAttribute) + public function updateAttributeAsyncWithHttpInfo($attribute_category, $attribute_name, $update_attribute) { $returnType = ''; - $request = $this->updateAttributeRequest($attributeCategory, $attributeName, $updateAttribute); + $request = $this->updateAttributeRequest($attribute_category, $attribute_name, $update_attribute); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6919,31 +6786,31 @@ function ($exception) { /** * Create request for operation 'updateAttribute' * - * @param string $attributeCategory Category of the attribute (required) - * @param string $attributeName Name of the existing attribute (required) - * @param \SendinBlue\Client\Model\UpdateAttribute $updateAttribute Values to update an attribute (required) + * @param string $attribute_category Category of the attribute (required) + * @param string $attribute_name Name of the existing attribute (required) + * @param \SendinBlue\Client\Model\UpdateAttribute $update_attribute Values to update an attribute (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function updateAttributeRequest($attributeCategory, $attributeName, $updateAttribute) + protected function updateAttributeRequest($attribute_category, $attribute_name, $update_attribute) { - // verify the required parameter 'attributeCategory' is set - if ($attributeCategory === null || (is_array($attributeCategory) && count($attributeCategory) === 0)) { + // verify the required parameter 'attribute_category' is set + if ($attribute_category === null || (is_array($attribute_category) && count($attribute_category) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $attributeCategory when calling updateAttribute' + 'Missing the required parameter $attribute_category when calling updateAttribute' ); } - // verify the required parameter 'attributeName' is set - if ($attributeName === null || (is_array($attributeName) && count($attributeName) === 0)) { + // verify the required parameter 'attribute_name' is set + if ($attribute_name === null || (is_array($attribute_name) && count($attribute_name) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $attributeName when calling updateAttribute' + 'Missing the required parameter $attribute_name when calling updateAttribute' ); } - // verify the required parameter 'updateAttribute' is set - if ($updateAttribute === null || (is_array($updateAttribute) && count($updateAttribute) === 0)) { + // verify the required parameter 'update_attribute' is set + if ($update_attribute === null || (is_array($update_attribute) && count($update_attribute) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $updateAttribute when calling updateAttribute' + 'Missing the required parameter $update_attribute when calling updateAttribute' ); } @@ -6956,26 +6823,26 @@ protected function updateAttributeRequest($attributeCategory, $attributeName, $u // path params - if ($attributeCategory !== null) { + if ($attribute_category !== null) { $resourcePath = str_replace( '{' . 'attributeCategory' . '}', - ObjectSerializer::toPathValue($attributeCategory), + ObjectSerializer::toPathValue($attribute_category), $resourcePath ); } // path params - if ($attributeName !== null) { + if ($attribute_name !== null) { $resourcePath = str_replace( '{' . 'attributeName' . '}', - ObjectSerializer::toPathValue($attributeName), + ObjectSerializer::toPathValue($attribute_name), $resourcePath ); } // body params $_tempBody = null; - if (isset($updateAttribute)) { - $_tempBody = $updateAttribute; + if (isset($update_attribute)) { + $_tempBody = $update_attribute; } if ($multipart) { @@ -7030,11 +6897,6 @@ protected function updateAttributeRequest($attributeCategory, $attributeName, $u if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -7056,274 +6918,21 @@ protected function updateAttributeRequest($attributeCategory, $attributeName, $u ); } - /** - * Operation updateBatchContacts - * - * Update multiple contacts - * - * @param \SendinBlue\Client\Model\UpdateBatchContacts $updateBatchContacts Values to update multiple contacts (required) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - */ - public function updateBatchContacts($updateBatchContacts) - { - $this->updateBatchContactsWithHttpInfo($updateBatchContacts); - } - - /** - * Operation updateBatchContactsWithHttpInfo - * - * Update multiple contacts - * - * @param \SendinBlue\Client\Model\UpdateBatchContacts $updateBatchContacts Values to update multiple contacts (required) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function updateBatchContactsWithHttpInfo($updateBatchContacts) - { - $returnType = ''; - $request = $this->updateBatchContactsRequest($updateBatchContacts); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 207: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\UpdateBatchContactsModel', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\ErrorModel', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation updateBatchContactsAsync - * - * Update multiple contacts - * - * @param \SendinBlue\Client\Model\UpdateBatchContacts $updateBatchContacts Values to update multiple contacts (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function updateBatchContactsAsync($updateBatchContacts) - { - return $this->updateBatchContactsAsyncWithHttpInfo($updateBatchContacts) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation updateBatchContactsAsyncWithHttpInfo - * - * Update multiple contacts - * - * @param \SendinBlue\Client\Model\UpdateBatchContacts $updateBatchContacts Values to update multiple contacts (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function updateBatchContactsAsyncWithHttpInfo($updateBatchContacts) - { - $returnType = ''; - $request = $this->updateBatchContactsRequest($updateBatchContacts); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'updateBatchContacts' - * - * @param \SendinBlue\Client\Model\UpdateBatchContacts $updateBatchContacts Values to update multiple contacts (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function updateBatchContactsRequest($updateBatchContacts) - { - // verify the required parameter 'updateBatchContacts' is set - if ($updateBatchContacts === null || (is_array($updateBatchContacts) && count($updateBatchContacts) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $updateBatchContacts when calling updateBatchContacts' - ); - } - - $resourcePath = '/contacts/batch'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // body params - $_tempBody = null; - if (isset($updateBatchContacts)) { - $_tempBody = $updateBatchContacts; - } - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - - if($headers['Content-Type'] === 'application/json') { - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass) { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - // array has no __toString(), so we should encode it manually - if(is_array($httpBody)) { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); - } - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('api-key'); - if ($apiKey !== null) { - $headers['api-key'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - /** * Operation updateContact * * Update a contact * - * @param string $identifier Email (urlencoded) OR ID of the contact (required) - * @param \SendinBlue\Client\Model\UpdateContact $updateContact Values to update a contact (required) + * @param string $email Email (urlencoded) of the contact (required) + * @param \SendinBlue\Client\Model\UpdateContact $update_contact Values to update a contact (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function updateContact($identifier, $updateContact) + public function updateContact($email, $update_contact) { - $this->updateContactWithHttpInfo($identifier, $updateContact); + $this->updateContactWithHttpInfo($email, $update_contact); } /** @@ -7331,17 +6940,17 @@ public function updateContact($identifier, $updateContact) * * Update a contact * - * @param string $identifier Email (urlencoded) OR ID of the contact (required) - * @param \SendinBlue\Client\Model\UpdateContact $updateContact Values to update a contact (required) + * @param string $email Email (urlencoded) of the contact (required) + * @param \SendinBlue\Client\Model\UpdateContact $update_contact Values to update a contact (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function updateContactWithHttpInfo($identifier, $updateContact) + public function updateContactWithHttpInfo($email, $update_contact) { $returnType = ''; - $request = $this->updateContactRequest($identifier, $updateContact); + $request = $this->updateContactRequest($email, $update_contact); try { $options = $this->createHttpClientOption(); @@ -7401,15 +7010,15 @@ public function updateContactWithHttpInfo($identifier, $updateContact) * * Update a contact * - * @param string $identifier Email (urlencoded) OR ID of the contact (required) - * @param \SendinBlue\Client\Model\UpdateContact $updateContact Values to update a contact (required) + * @param string $email Email (urlencoded) of the contact (required) + * @param \SendinBlue\Client\Model\UpdateContact $update_contact Values to update a contact (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateContactAsync($identifier, $updateContact) + public function updateContactAsync($email, $update_contact) { - return $this->updateContactAsyncWithHttpInfo($identifier, $updateContact) + return $this->updateContactAsyncWithHttpInfo($email, $update_contact) ->then( function ($response) { return $response[0]; @@ -7422,16 +7031,16 @@ function ($response) { * * Update a contact * - * @param string $identifier Email (urlencoded) OR ID of the contact (required) - * @param \SendinBlue\Client\Model\UpdateContact $updateContact Values to update a contact (required) + * @param string $email Email (urlencoded) of the contact (required) + * @param \SendinBlue\Client\Model\UpdateContact $update_contact Values to update a contact (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateContactAsyncWithHttpInfo($identifier, $updateContact) + public function updateContactAsyncWithHttpInfo($email, $update_contact) { $returnType = ''; - $request = $this->updateContactRequest($identifier, $updateContact); + $request = $this->updateContactRequest($email, $update_contact); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7459,28 +7068,28 @@ function ($exception) { /** * Create request for operation 'updateContact' * - * @param string $identifier Email (urlencoded) OR ID of the contact (required) - * @param \SendinBlue\Client\Model\UpdateContact $updateContact Values to update a contact (required) + * @param string $email Email (urlencoded) of the contact (required) + * @param \SendinBlue\Client\Model\UpdateContact $update_contact Values to update a contact (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function updateContactRequest($identifier, $updateContact) + protected function updateContactRequest($email, $update_contact) { - // verify the required parameter 'identifier' is set - if ($identifier === null || (is_array($identifier) && count($identifier) === 0)) { + // verify the required parameter 'email' is set + if ($email === null || (is_array($email) && count($email) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $identifier when calling updateContact' + 'Missing the required parameter $email when calling updateContact' ); } - // verify the required parameter 'updateContact' is set - if ($updateContact === null || (is_array($updateContact) && count($updateContact) === 0)) { + // verify the required parameter 'update_contact' is set + if ($update_contact === null || (is_array($update_contact) && count($update_contact) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $updateContact when calling updateContact' + 'Missing the required parameter $update_contact when calling updateContact' ); } - $resourcePath = '/contacts/{identifier}'; + $resourcePath = '/contacts/{email}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -7489,18 +7098,18 @@ protected function updateContactRequest($identifier, $updateContact) // path params - if ($identifier !== null) { + if ($email !== null) { $resourcePath = str_replace( - '{' . 'identifier' . '}', - ObjectSerializer::toPathValue($identifier), + '{' . 'email' . '}', + ObjectSerializer::toPathValue($email), $resourcePath ); } // body params $_tempBody = null; - if (isset($updateContact)) { - $_tempBody = $updateContact; + if (isset($update_contact)) { + $_tempBody = $update_contact; } if ($multipart) { @@ -7555,11 +7164,6 @@ protected function updateContactRequest($identifier, $updateContact) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -7586,16 +7190,16 @@ protected function updateContactRequest($identifier, $updateContact) * * Update a folder * - * @param int $folderId Id of the folder (required) - * @param \SendinBlue\Client\Model\CreateUpdateFolder $updateFolder Name of the folder (required) + * @param int $folder_id Id of the folder (required) + * @param \SendinBlue\Client\Model\CreateUpdateFolder $update_folder Name of the folder (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function updateFolder($folderId, $updateFolder) + public function updateFolder($folder_id, $update_folder) { - $this->updateFolderWithHttpInfo($folderId, $updateFolder); + $this->updateFolderWithHttpInfo($folder_id, $update_folder); } /** @@ -7603,17 +7207,17 @@ public function updateFolder($folderId, $updateFolder) * * Update a folder * - * @param int $folderId Id of the folder (required) - * @param \SendinBlue\Client\Model\CreateUpdateFolder $updateFolder Name of the folder (required) + * @param int $folder_id Id of the folder (required) + * @param \SendinBlue\Client\Model\CreateUpdateFolder $update_folder Name of the folder (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function updateFolderWithHttpInfo($folderId, $updateFolder) + public function updateFolderWithHttpInfo($folder_id, $update_folder) { $returnType = ''; - $request = $this->updateFolderRequest($folderId, $updateFolder); + $request = $this->updateFolderRequest($folder_id, $update_folder); try { $options = $this->createHttpClientOption(); @@ -7673,15 +7277,15 @@ public function updateFolderWithHttpInfo($folderId, $updateFolder) * * Update a folder * - * @param int $folderId Id of the folder (required) - * @param \SendinBlue\Client\Model\CreateUpdateFolder $updateFolder Name of the folder (required) + * @param int $folder_id Id of the folder (required) + * @param \SendinBlue\Client\Model\CreateUpdateFolder $update_folder Name of the folder (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateFolderAsync($folderId, $updateFolder) + public function updateFolderAsync($folder_id, $update_folder) { - return $this->updateFolderAsyncWithHttpInfo($folderId, $updateFolder) + return $this->updateFolderAsyncWithHttpInfo($folder_id, $update_folder) ->then( function ($response) { return $response[0]; @@ -7694,16 +7298,16 @@ function ($response) { * * Update a folder * - * @param int $folderId Id of the folder (required) - * @param \SendinBlue\Client\Model\CreateUpdateFolder $updateFolder Name of the folder (required) + * @param int $folder_id Id of the folder (required) + * @param \SendinBlue\Client\Model\CreateUpdateFolder $update_folder Name of the folder (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateFolderAsyncWithHttpInfo($folderId, $updateFolder) + public function updateFolderAsyncWithHttpInfo($folder_id, $update_folder) { $returnType = ''; - $request = $this->updateFolderRequest($folderId, $updateFolder); + $request = $this->updateFolderRequest($folder_id, $update_folder); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7731,24 +7335,24 @@ function ($exception) { /** * Create request for operation 'updateFolder' * - * @param int $folderId Id of the folder (required) - * @param \SendinBlue\Client\Model\CreateUpdateFolder $updateFolder Name of the folder (required) + * @param int $folder_id Id of the folder (required) + * @param \SendinBlue\Client\Model\CreateUpdateFolder $update_folder Name of the folder (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function updateFolderRequest($folderId, $updateFolder) + protected function updateFolderRequest($folder_id, $update_folder) { - // verify the required parameter 'folderId' is set - if ($folderId === null || (is_array($folderId) && count($folderId) === 0)) { + // verify the required parameter 'folder_id' is set + if ($folder_id === null || (is_array($folder_id) && count($folder_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $folderId when calling updateFolder' + 'Missing the required parameter $folder_id when calling updateFolder' ); } - // verify the required parameter 'updateFolder' is set - if ($updateFolder === null || (is_array($updateFolder) && count($updateFolder) === 0)) { + // verify the required parameter 'update_folder' is set + if ($update_folder === null || (is_array($update_folder) && count($update_folder) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $updateFolder when calling updateFolder' + 'Missing the required parameter $update_folder when calling updateFolder' ); } @@ -7761,18 +7365,18 @@ protected function updateFolderRequest($folderId, $updateFolder) // path params - if ($folderId !== null) { + if ($folder_id !== null) { $resourcePath = str_replace( '{' . 'folderId' . '}', - ObjectSerializer::toPathValue($folderId), + ObjectSerializer::toPathValue($folder_id), $resourcePath ); } // body params $_tempBody = null; - if (isset($updateFolder)) { - $_tempBody = $updateFolder; + if (isset($update_folder)) { + $_tempBody = $update_folder; } if ($multipart) { @@ -7827,11 +7431,6 @@ protected function updateFolderRequest($folderId, $updateFolder) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -7858,16 +7457,16 @@ protected function updateFolderRequest($folderId, $updateFolder) * * Update a list * - * @param int $listId Id of the list (required) - * @param \SendinBlue\Client\Model\UpdateList $updateList Values to update a list (required) + * @param int $list_id Id of the list (required) + * @param \SendinBlue\Client\Model\UpdateList $update_list Values to update a list (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function updateList($listId, $updateList) + public function updateList($list_id, $update_list) { - $this->updateListWithHttpInfo($listId, $updateList); + $this->updateListWithHttpInfo($list_id, $update_list); } /** @@ -7875,17 +7474,17 @@ public function updateList($listId, $updateList) * * Update a list * - * @param int $listId Id of the list (required) - * @param \SendinBlue\Client\Model\UpdateList $updateList Values to update a list (required) + * @param int $list_id Id of the list (required) + * @param \SendinBlue\Client\Model\UpdateList $update_list Values to update a list (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function updateListWithHttpInfo($listId, $updateList) + public function updateListWithHttpInfo($list_id, $update_list) { $returnType = ''; - $request = $this->updateListRequest($listId, $updateList); + $request = $this->updateListRequest($list_id, $update_list); try { $options = $this->createHttpClientOption(); @@ -7945,15 +7544,15 @@ public function updateListWithHttpInfo($listId, $updateList) * * Update a list * - * @param int $listId Id of the list (required) - * @param \SendinBlue\Client\Model\UpdateList $updateList Values to update a list (required) + * @param int $list_id Id of the list (required) + * @param \SendinBlue\Client\Model\UpdateList $update_list Values to update a list (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateListAsync($listId, $updateList) + public function updateListAsync($list_id, $update_list) { - return $this->updateListAsyncWithHttpInfo($listId, $updateList) + return $this->updateListAsyncWithHttpInfo($list_id, $update_list) ->then( function ($response) { return $response[0]; @@ -7966,16 +7565,16 @@ function ($response) { * * Update a list * - * @param int $listId Id of the list (required) - * @param \SendinBlue\Client\Model\UpdateList $updateList Values to update a list (required) + * @param int $list_id Id of the list (required) + * @param \SendinBlue\Client\Model\UpdateList $update_list Values to update a list (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateListAsyncWithHttpInfo($listId, $updateList) + public function updateListAsyncWithHttpInfo($list_id, $update_list) { $returnType = ''; - $request = $this->updateListRequest($listId, $updateList); + $request = $this->updateListRequest($list_id, $update_list); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -8003,24 +7602,24 @@ function ($exception) { /** * Create request for operation 'updateList' * - * @param int $listId Id of the list (required) - * @param \SendinBlue\Client\Model\UpdateList $updateList Values to update a list (required) + * @param int $list_id Id of the list (required) + * @param \SendinBlue\Client\Model\UpdateList $update_list Values to update a list (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function updateListRequest($listId, $updateList) + protected function updateListRequest($list_id, $update_list) { - // verify the required parameter 'listId' is set - if ($listId === null || (is_array($listId) && count($listId) === 0)) { + // verify the required parameter 'list_id' is set + if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $listId when calling updateList' + 'Missing the required parameter $list_id when calling updateList' ); } - // verify the required parameter 'updateList' is set - if ($updateList === null || (is_array($updateList) && count($updateList) === 0)) { + // verify the required parameter 'update_list' is set + if ($update_list === null || (is_array($update_list) && count($update_list) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $updateList when calling updateList' + 'Missing the required parameter $update_list when calling updateList' ); } @@ -8033,18 +7632,18 @@ protected function updateListRequest($listId, $updateList) // path params - if ($listId !== null) { + if ($list_id !== null) { $resourcePath = str_replace( '{' . 'listId' . '}', - ObjectSerializer::toPathValue($listId), + ObjectSerializer::toPathValue($list_id), $resourcePath ); } // body params $_tempBody = null; - if (isset($updateList)) { - $_tempBody = $updateList; + if (isset($update_list)) { + $_tempBody = $update_list; } if ($multipart) { @@ -8099,11 +7698,6 @@ protected function updateListRequest($listId, $updateList) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { diff --git a/lib/Api/EmailCampaignsApi.php b/lib/Api/EmailCampaignsApi.php index 88d2cff5..1b945ff6 100644 --- a/lib/Api/EmailCampaignsApi.php +++ b/lib/Api/EmailCampaignsApi.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -92,15 +92,15 @@ public function getConfig() * * Create an email campaign * - * @param \SendinBlue\Client\Model\CreateEmailCampaign $emailCampaigns Values to create a campaign (required) + * @param \SendinBlue\Client\Model\CreateEmailCampaign $email_campaigns Values to create a campaign (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\CreateModel */ - public function createEmailCampaign($emailCampaigns) + public function createEmailCampaign($email_campaigns) { - list($response) = $this->createEmailCampaignWithHttpInfo($emailCampaigns); + list($response) = $this->createEmailCampaignWithHttpInfo($email_campaigns); return $response; } @@ -109,16 +109,16 @@ public function createEmailCampaign($emailCampaigns) * * Create an email campaign * - * @param \SendinBlue\Client\Model\CreateEmailCampaign $emailCampaigns Values to create a campaign (required) + * @param \SendinBlue\Client\Model\CreateEmailCampaign $email_campaigns Values to create a campaign (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\CreateModel, HTTP status code, HTTP response headers (array of strings) */ - public function createEmailCampaignWithHttpInfo($emailCampaigns) + public function createEmailCampaignWithHttpInfo($email_campaigns) { $returnType = '\SendinBlue\Client\Model\CreateModel'; - $request = $this->createEmailCampaignRequest($emailCampaigns); + $request = $this->createEmailCampaignRequest($email_campaigns); try { $options = $this->createHttpClientOption(); @@ -192,14 +192,14 @@ public function createEmailCampaignWithHttpInfo($emailCampaigns) * * Create an email campaign * - * @param \SendinBlue\Client\Model\CreateEmailCampaign $emailCampaigns Values to create a campaign (required) + * @param \SendinBlue\Client\Model\CreateEmailCampaign $email_campaigns Values to create a campaign (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createEmailCampaignAsync($emailCampaigns) + public function createEmailCampaignAsync($email_campaigns) { - return $this->createEmailCampaignAsyncWithHttpInfo($emailCampaigns) + return $this->createEmailCampaignAsyncWithHttpInfo($email_campaigns) ->then( function ($response) { return $response[0]; @@ -212,15 +212,15 @@ function ($response) { * * Create an email campaign * - * @param \SendinBlue\Client\Model\CreateEmailCampaign $emailCampaigns Values to create a campaign (required) + * @param \SendinBlue\Client\Model\CreateEmailCampaign $email_campaigns Values to create a campaign (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createEmailCampaignAsyncWithHttpInfo($emailCampaigns) + public function createEmailCampaignAsyncWithHttpInfo($email_campaigns) { $returnType = '\SendinBlue\Client\Model\CreateModel'; - $request = $this->createEmailCampaignRequest($emailCampaigns); + $request = $this->createEmailCampaignRequest($email_campaigns); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -262,17 +262,17 @@ function ($exception) { /** * Create request for operation 'createEmailCampaign' * - * @param \SendinBlue\Client\Model\CreateEmailCampaign $emailCampaigns Values to create a campaign (required) + * @param \SendinBlue\Client\Model\CreateEmailCampaign $email_campaigns Values to create a campaign (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function createEmailCampaignRequest($emailCampaigns) + protected function createEmailCampaignRequest($email_campaigns) { - // verify the required parameter 'emailCampaigns' is set - if ($emailCampaigns === null || (is_array($emailCampaigns) && count($emailCampaigns) === 0)) { + // verify the required parameter 'email_campaigns' is set + if ($email_campaigns === null || (is_array($email_campaigns) && count($email_campaigns) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $emailCampaigns when calling createEmailCampaign' + 'Missing the required parameter $email_campaigns when calling createEmailCampaign' ); } @@ -287,8 +287,8 @@ protected function createEmailCampaignRequest($emailCampaigns) // body params $_tempBody = null; - if (isset($emailCampaigns)) { - $_tempBody = $emailCampaigns; + if (isset($email_campaigns)) { + $_tempBody = $email_campaigns; } if ($multipart) { @@ -343,11 +343,6 @@ protected function createEmailCampaignRequest($emailCampaigns) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -374,15 +369,15 @@ protected function createEmailCampaignRequest($emailCampaigns) * * Delete an email campaign * - * @param int $campaignId id of the campaign (required) + * @param int $campaign_id id of the campaign (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function deleteEmailCampaign($campaignId) + public function deleteEmailCampaign($campaign_id) { - $this->deleteEmailCampaignWithHttpInfo($campaignId); + $this->deleteEmailCampaignWithHttpInfo($campaign_id); } /** @@ -390,16 +385,16 @@ public function deleteEmailCampaign($campaignId) * * Delete an email campaign * - * @param int $campaignId id of the campaign (required) + * @param int $campaign_id id of the campaign (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteEmailCampaignWithHttpInfo($campaignId) + public function deleteEmailCampaignWithHttpInfo($campaign_id) { $returnType = ''; - $request = $this->deleteEmailCampaignRequest($campaignId); + $request = $this->deleteEmailCampaignRequest($campaign_id); try { $options = $this->createHttpClientOption(); @@ -433,7 +428,7 @@ public function deleteEmailCampaignWithHttpInfo($campaignId) } catch (ApiException $e) { switch ($e->getCode()) { - case 400: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -441,7 +436,7 @@ public function deleteEmailCampaignWithHttpInfo($campaignId) ); $e->setResponseObject($data); break; - case 404: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -459,14 +454,14 @@ public function deleteEmailCampaignWithHttpInfo($campaignId) * * Delete an email campaign * - * @param int $campaignId id of the campaign (required) + * @param int $campaign_id id of the campaign (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteEmailCampaignAsync($campaignId) + public function deleteEmailCampaignAsync($campaign_id) { - return $this->deleteEmailCampaignAsyncWithHttpInfo($campaignId) + return $this->deleteEmailCampaignAsyncWithHttpInfo($campaign_id) ->then( function ($response) { return $response[0]; @@ -479,15 +474,15 @@ function ($response) { * * Delete an email campaign * - * @param int $campaignId id of the campaign (required) + * @param int $campaign_id id of the campaign (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteEmailCampaignAsyncWithHttpInfo($campaignId) + public function deleteEmailCampaignAsyncWithHttpInfo($campaign_id) { $returnType = ''; - $request = $this->deleteEmailCampaignRequest($campaignId); + $request = $this->deleteEmailCampaignRequest($campaign_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -515,17 +510,17 @@ function ($exception) { /** * Create request for operation 'deleteEmailCampaign' * - * @param int $campaignId id of the campaign (required) + * @param int $campaign_id id of the campaign (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function deleteEmailCampaignRequest($campaignId) + protected function deleteEmailCampaignRequest($campaign_id) { - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + // verify the required parameter 'campaign_id' is set + if ($campaign_id === null || (is_array($campaign_id) && count($campaign_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling deleteEmailCampaign' + 'Missing the required parameter $campaign_id when calling deleteEmailCampaign' ); } @@ -538,10 +533,10 @@ protected function deleteEmailCampaignRequest($campaignId) // path params - if ($campaignId !== null) { + if ($campaign_id !== null) { $resourcePath = str_replace( '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), + ObjectSerializer::toPathValue($campaign_id), $resourcePath ); } @@ -601,11 +596,6 @@ protected function deleteEmailCampaignRequest($campaignId) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -632,16 +622,16 @@ protected function deleteEmailCampaignRequest($campaignId) * * Export the recipients of an email campaign * - * @param int $campaignId Id of the campaign (required) - * @param \SendinBlue\Client\Model\EmailExportRecipients $recipientExport Values to send for a recipient export request (optional) + * @param int $campaign_id Id of the campaign (required) + * @param \SendinBlue\Client\Model\EmailExportRecipients $recipient_export Values to send for a recipient export request (optional) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\CreatedProcessId */ - public function emailExportRecipients($campaignId, $recipientExport = null) + public function emailExportRecipients($campaign_id, $recipient_export = null) { - list($response) = $this->emailExportRecipientsWithHttpInfo($campaignId, $recipientExport); + list($response) = $this->emailExportRecipientsWithHttpInfo($campaign_id, $recipient_export); return $response; } @@ -650,17 +640,17 @@ public function emailExportRecipients($campaignId, $recipientExport = null) * * Export the recipients of an email campaign * - * @param int $campaignId Id of the campaign (required) - * @param \SendinBlue\Client\Model\EmailExportRecipients $recipientExport Values to send for a recipient export request (optional) + * @param int $campaign_id Id of the campaign (required) + * @param \SendinBlue\Client\Model\EmailExportRecipients $recipient_export Values to send for a recipient export request (optional) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\CreatedProcessId, HTTP status code, HTTP response headers (array of strings) */ - public function emailExportRecipientsWithHttpInfo($campaignId, $recipientExport = null) + public function emailExportRecipientsWithHttpInfo($campaign_id, $recipient_export = null) { $returnType = '\SendinBlue\Client\Model\CreatedProcessId'; - $request = $this->emailExportRecipientsRequest($campaignId, $recipientExport); + $request = $this->emailExportRecipientsRequest($campaign_id, $recipient_export); try { $options = $this->createHttpClientOption(); @@ -742,15 +732,15 @@ public function emailExportRecipientsWithHttpInfo($campaignId, $recipientExport * * Export the recipients of an email campaign * - * @param int $campaignId Id of the campaign (required) - * @param \SendinBlue\Client\Model\EmailExportRecipients $recipientExport Values to send for a recipient export request (optional) + * @param int $campaign_id Id of the campaign (required) + * @param \SendinBlue\Client\Model\EmailExportRecipients $recipient_export Values to send for a recipient export request (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function emailExportRecipientsAsync($campaignId, $recipientExport = null) + public function emailExportRecipientsAsync($campaign_id, $recipient_export = null) { - return $this->emailExportRecipientsAsyncWithHttpInfo($campaignId, $recipientExport) + return $this->emailExportRecipientsAsyncWithHttpInfo($campaign_id, $recipient_export) ->then( function ($response) { return $response[0]; @@ -763,16 +753,16 @@ function ($response) { * * Export the recipients of an email campaign * - * @param int $campaignId Id of the campaign (required) - * @param \SendinBlue\Client\Model\EmailExportRecipients $recipientExport Values to send for a recipient export request (optional) + * @param int $campaign_id Id of the campaign (required) + * @param \SendinBlue\Client\Model\EmailExportRecipients $recipient_export Values to send for a recipient export request (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function emailExportRecipientsAsyncWithHttpInfo($campaignId, $recipientExport = null) + public function emailExportRecipientsAsyncWithHttpInfo($campaign_id, $recipient_export = null) { $returnType = '\SendinBlue\Client\Model\CreatedProcessId'; - $request = $this->emailExportRecipientsRequest($campaignId, $recipientExport); + $request = $this->emailExportRecipientsRequest($campaign_id, $recipient_export); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -814,18 +804,18 @@ function ($exception) { /** * Create request for operation 'emailExportRecipients' * - * @param int $campaignId Id of the campaign (required) - * @param \SendinBlue\Client\Model\EmailExportRecipients $recipientExport Values to send for a recipient export request (optional) + * @param int $campaign_id Id of the campaign (required) + * @param \SendinBlue\Client\Model\EmailExportRecipients $recipient_export Values to send for a recipient export request (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function emailExportRecipientsRequest($campaignId, $recipientExport = null) + protected function emailExportRecipientsRequest($campaign_id, $recipient_export = null) { - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + // verify the required parameter 'campaign_id' is set + if ($campaign_id === null || (is_array($campaign_id) && count($campaign_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling emailExportRecipients' + 'Missing the required parameter $campaign_id when calling emailExportRecipients' ); } @@ -838,18 +828,18 @@ protected function emailExportRecipientsRequest($campaignId, $recipientExport = // path params - if ($campaignId !== null) { + if ($campaign_id !== null) { $resourcePath = str_replace( '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), + ObjectSerializer::toPathValue($campaign_id), $resourcePath ); } // body params $_tempBody = null; - if (isset($recipientExport)) { - $_tempBody = $recipientExport; + if (isset($recipient_export)) { + $_tempBody = $recipient_export; } if ($multipart) { @@ -904,11 +894,6 @@ protected function emailExportRecipientsRequest($campaignId, $recipientExport = if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -935,15 +920,15 @@ protected function emailExportRecipientsRequest($campaignId, $recipientExport = * * Get an A/B test email campaign results * - * @param int $campaignId Id of the A/B test campaign (required) + * @param int $campaign_id Id of the A/B test campaign (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\AbTestCampaignResult */ - public function getAbTestCampaignResult($campaignId) + public function getAbTestCampaignResult($campaign_id) { - list($response) = $this->getAbTestCampaignResultWithHttpInfo($campaignId); + list($response) = $this->getAbTestCampaignResultWithHttpInfo($campaign_id); return $response; } @@ -952,16 +937,16 @@ public function getAbTestCampaignResult($campaignId) * * Get an A/B test email campaign results * - * @param int $campaignId Id of the A/B test campaign (required) + * @param int $campaign_id Id of the A/B test campaign (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\AbTestCampaignResult, HTTP status code, HTTP response headers (array of strings) */ - public function getAbTestCampaignResultWithHttpInfo($campaignId) + public function getAbTestCampaignResultWithHttpInfo($campaign_id) { $returnType = '\SendinBlue\Client\Model\AbTestCampaignResult'; - $request = $this->getAbTestCampaignResultRequest($campaignId); + $request = $this->getAbTestCampaignResultRequest($campaign_id); try { $options = $this->createHttpClientOption(); @@ -1017,14 +1002,6 @@ public function getAbTestCampaignResultWithHttpInfo($campaignId) ); $e->setResponseObject($data); break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\ErrorModel', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1033,7 +1010,7 @@ public function getAbTestCampaignResultWithHttpInfo($campaignId) ); $e->setResponseObject($data); break; - case 405: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -1051,14 +1028,14 @@ public function getAbTestCampaignResultWithHttpInfo($campaignId) * * Get an A/B test email campaign results * - * @param int $campaignId Id of the A/B test campaign (required) + * @param int $campaign_id Id of the A/B test campaign (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAbTestCampaignResultAsync($campaignId) + public function getAbTestCampaignResultAsync($campaign_id) { - return $this->getAbTestCampaignResultAsyncWithHttpInfo($campaignId) + return $this->getAbTestCampaignResultAsyncWithHttpInfo($campaign_id) ->then( function ($response) { return $response[0]; @@ -1071,15 +1048,15 @@ function ($response) { * * Get an A/B test email campaign results * - * @param int $campaignId Id of the A/B test campaign (required) + * @param int $campaign_id Id of the A/B test campaign (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAbTestCampaignResultAsyncWithHttpInfo($campaignId) + public function getAbTestCampaignResultAsyncWithHttpInfo($campaign_id) { $returnType = '\SendinBlue\Client\Model\AbTestCampaignResult'; - $request = $this->getAbTestCampaignResultRequest($campaignId); + $request = $this->getAbTestCampaignResultRequest($campaign_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1121,17 +1098,17 @@ function ($exception) { /** * Create request for operation 'getAbTestCampaignResult' * - * @param int $campaignId Id of the A/B test campaign (required) + * @param int $campaign_id Id of the A/B test campaign (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getAbTestCampaignResultRequest($campaignId) + protected function getAbTestCampaignResultRequest($campaign_id) { - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + // verify the required parameter 'campaign_id' is set + if ($campaign_id === null || (is_array($campaign_id) && count($campaign_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling getAbTestCampaignResult' + 'Missing the required parameter $campaign_id when calling getAbTestCampaignResult' ); } @@ -1144,10 +1121,10 @@ protected function getAbTestCampaignResultRequest($campaignId) // path params - if ($campaignId !== null) { + if ($campaign_id !== null) { $resourcePath = str_replace( '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), + ObjectSerializer::toPathValue($campaign_id), $resourcePath ); } @@ -1207,11 +1184,6 @@ protected function getAbTestCampaignResultRequest($campaignId) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1238,15 +1210,15 @@ protected function getAbTestCampaignResultRequest($campaignId) * * Get an email campaign report * - * @param int $campaignId Id of the campaign (required) + * @param int $campaign_id Id of the campaign (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\GetEmailCampaign */ - public function getEmailCampaign($campaignId) + public function getEmailCampaign($campaign_id) { - list($response) = $this->getEmailCampaignWithHttpInfo($campaignId); + list($response) = $this->getEmailCampaignWithHttpInfo($campaign_id); return $response; } @@ -1255,16 +1227,16 @@ public function getEmailCampaign($campaignId) * * Get an email campaign report * - * @param int $campaignId Id of the campaign (required) + * @param int $campaign_id Id of the campaign (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\GetEmailCampaign, HTTP status code, HTTP response headers (array of strings) */ - public function getEmailCampaignWithHttpInfo($campaignId) + public function getEmailCampaignWithHttpInfo($campaign_id) { $returnType = '\SendinBlue\Client\Model\GetEmailCampaign'; - $request = $this->getEmailCampaignRequest($campaignId); + $request = $this->getEmailCampaignRequest($campaign_id); try { $options = $this->createHttpClientOption(); @@ -1320,7 +1292,7 @@ public function getEmailCampaignWithHttpInfo($campaignId) ); $e->setResponseObject($data); break; - case 400: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -1328,7 +1300,7 @@ public function getEmailCampaignWithHttpInfo($campaignId) ); $e->setResponseObject($data); break; - case 404: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -1346,14 +1318,14 @@ public function getEmailCampaignWithHttpInfo($campaignId) * * Get an email campaign report * - * @param int $campaignId Id of the campaign (required) + * @param int $campaign_id Id of the campaign (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEmailCampaignAsync($campaignId) + public function getEmailCampaignAsync($campaign_id) { - return $this->getEmailCampaignAsyncWithHttpInfo($campaignId) + return $this->getEmailCampaignAsyncWithHttpInfo($campaign_id) ->then( function ($response) { return $response[0]; @@ -1366,15 +1338,15 @@ function ($response) { * * Get an email campaign report * - * @param int $campaignId Id of the campaign (required) + * @param int $campaign_id Id of the campaign (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEmailCampaignAsyncWithHttpInfo($campaignId) + public function getEmailCampaignAsyncWithHttpInfo($campaign_id) { $returnType = '\SendinBlue\Client\Model\GetEmailCampaign'; - $request = $this->getEmailCampaignRequest($campaignId); + $request = $this->getEmailCampaignRequest($campaign_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1416,17 +1388,17 @@ function ($exception) { /** * Create request for operation 'getEmailCampaign' * - * @param int $campaignId Id of the campaign (required) + * @param int $campaign_id Id of the campaign (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getEmailCampaignRequest($campaignId) + protected function getEmailCampaignRequest($campaign_id) { - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + // verify the required parameter 'campaign_id' is set + if ($campaign_id === null || (is_array($campaign_id) && count($campaign_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling getEmailCampaign' + 'Missing the required parameter $campaign_id when calling getEmailCampaign' ); } @@ -1439,10 +1411,10 @@ protected function getEmailCampaignRequest($campaignId) // path params - if ($campaignId !== null) { + if ($campaign_id !== null) { $resourcePath = str_replace( '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), + ObjectSerializer::toPathValue($campaign_id), $resourcePath ); } @@ -1502,11 +1474,6 @@ protected function getEmailCampaignRequest($campaignId) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1535,19 +1502,18 @@ protected function getEmailCampaignRequest($campaignId) * * @param string $type Filter on the type of the campaigns (optional) * @param string $status Filter on the status of the campaign (optional) - * @param string $startDate Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) - * @param string $endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param \DateTime $start_date Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param \DateTime $end_date Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) * @param int $limit Number of documents per page (optional, default to 500) * @param int $offset Index of the first document in the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\GetEmailCampaigns */ - public function getEmailCampaigns($type = null, $status = null, $startDate = null, $endDate = null, $limit = '500', $offset = '0', $sort = 'desc') + public function getEmailCampaigns($type = null, $status = null, $start_date = null, $end_date = null, $limit = '500', $offset = '0') { - list($response) = $this->getEmailCampaignsWithHttpInfo($type, $status, $startDate, $endDate, $limit, $offset, $sort); + list($response) = $this->getEmailCampaignsWithHttpInfo($type, $status, $start_date, $end_date, $limit, $offset); return $response; } @@ -1558,20 +1524,19 @@ public function getEmailCampaigns($type = null, $status = null, $startDate = nul * * @param string $type Filter on the type of the campaigns (optional) * @param string $status Filter on the status of the campaign (optional) - * @param string $startDate Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) - * @param string $endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param \DateTime $start_date Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param \DateTime $end_date Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) * @param int $limit Number of documents per page (optional, default to 500) * @param int $offset Index of the first document in the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\GetEmailCampaigns, HTTP status code, HTTP response headers (array of strings) */ - public function getEmailCampaignsWithHttpInfo($type = null, $status = null, $startDate = null, $endDate = null, $limit = '500', $offset = '0', $sort = 'desc') + public function getEmailCampaignsWithHttpInfo($type = null, $status = null, $start_date = null, $end_date = null, $limit = '500', $offset = '0') { $returnType = '\SendinBlue\Client\Model\GetEmailCampaigns'; - $request = $this->getEmailCampaignsRequest($type, $status, $startDate, $endDate, $limit, $offset, $sort); + $request = $this->getEmailCampaignsRequest($type, $status, $start_date, $end_date, $limit, $offset); try { $options = $this->createHttpClientOption(); @@ -1647,18 +1612,17 @@ public function getEmailCampaignsWithHttpInfo($type = null, $status = null, $sta * * @param string $type Filter on the type of the campaigns (optional) * @param string $status Filter on the status of the campaign (optional) - * @param string $startDate Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) - * @param string $endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param \DateTime $start_date Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param \DateTime $end_date Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) * @param int $limit Number of documents per page (optional, default to 500) * @param int $offset Index of the first document in the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEmailCampaignsAsync($type = null, $status = null, $startDate = null, $endDate = null, $limit = '500', $offset = '0', $sort = 'desc') + public function getEmailCampaignsAsync($type = null, $status = null, $start_date = null, $end_date = null, $limit = '500', $offset = '0') { - return $this->getEmailCampaignsAsyncWithHttpInfo($type, $status, $startDate, $endDate, $limit, $offset, $sort) + return $this->getEmailCampaignsAsyncWithHttpInfo($type, $status, $start_date, $end_date, $limit, $offset) ->then( function ($response) { return $response[0]; @@ -1673,19 +1637,18 @@ function ($response) { * * @param string $type Filter on the type of the campaigns (optional) * @param string $status Filter on the status of the campaign (optional) - * @param string $startDate Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) - * @param string $endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param \DateTime $start_date Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param \DateTime $end_date Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) * @param int $limit Number of documents per page (optional, default to 500) * @param int $offset Index of the first document in the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEmailCampaignsAsyncWithHttpInfo($type = null, $status = null, $startDate = null, $endDate = null, $limit = '500', $offset = '0', $sort = 'desc') + public function getEmailCampaignsAsyncWithHttpInfo($type = null, $status = null, $start_date = null, $end_date = null, $limit = '500', $offset = '0') { $returnType = '\SendinBlue\Client\Model\GetEmailCampaigns'; - $request = $this->getEmailCampaignsRequest($type, $status, $startDate, $endDate, $limit, $offset, $sort); + $request = $this->getEmailCampaignsRequest($type, $status, $start_date, $end_date, $limit, $offset); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1729,16 +1692,15 @@ function ($exception) { * * @param string $type Filter on the type of the campaigns (optional) * @param string $status Filter on the status of the campaign (optional) - * @param string $startDate Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) - * @param string $endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param \DateTime $start_date Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param \DateTime $end_date Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) * @param int $limit Number of documents per page (optional, default to 500) * @param int $offset Index of the first document in the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getEmailCampaignsRequest($type = null, $status = null, $startDate = null, $endDate = null, $limit = '500', $offset = '0', $sort = 'desc') + protected function getEmailCampaignsRequest($type = null, $status = null, $start_date = null, $end_date = null, $limit = '500', $offset = '0') { if ($limit !== null && $limit > 1000) { throw new \InvalidArgumentException('invalid value for "$limit" when calling EmailCampaignsApi.getEmailCampaigns, must be smaller than or equal to 1000.'); @@ -1761,12 +1723,12 @@ protected function getEmailCampaignsRequest($type = null, $status = null, $start $queryParams['status'] = ObjectSerializer::toQueryValue($status); } // query params - if ($startDate !== null) { - $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); + if ($start_date !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($start_date); } // query params - if ($endDate !== null) { - $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); + if ($end_date !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($end_date); } // query params if ($limit !== null) { @@ -1776,10 +1738,6 @@ protected function getEmailCampaignsRequest($type = null, $status = null, $start if ($offset !== null) { $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); } - // query params - if ($sort !== null) { - $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); - } // body params @@ -1837,11 +1795,6 @@ protected function getEmailCampaignsRequest($type = null, $status = null, $start if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1868,15 +1821,15 @@ protected function getEmailCampaignsRequest($type = null, $status = null, $start * * Get a shared template url * - * @param int $campaignId Id of the campaign or template (required) + * @param int $campaign_id Id of the campaign or template (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\GetSharedTemplateUrl */ - public function getSharedTemplateUrl($campaignId) + public function getSharedTemplateUrl($campaign_id) { - list($response) = $this->getSharedTemplateUrlWithHttpInfo($campaignId); + list($response) = $this->getSharedTemplateUrlWithHttpInfo($campaign_id); return $response; } @@ -1885,16 +1838,16 @@ public function getSharedTemplateUrl($campaignId) * * Get a shared template url * - * @param int $campaignId Id of the campaign or template (required) + * @param int $campaign_id Id of the campaign or template (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\GetSharedTemplateUrl, HTTP status code, HTTP response headers (array of strings) */ - public function getSharedTemplateUrlWithHttpInfo($campaignId) + public function getSharedTemplateUrlWithHttpInfo($campaign_id) { $returnType = '\SendinBlue\Client\Model\GetSharedTemplateUrl'; - $request = $this->getSharedTemplateUrlRequest($campaignId); + $request = $this->getSharedTemplateUrlRequest($campaign_id); try { $options = $this->createHttpClientOption(); @@ -1950,7 +1903,7 @@ public function getSharedTemplateUrlWithHttpInfo($campaignId) ); $e->setResponseObject($data); break; - case 400: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -1958,7 +1911,15 @@ public function getSharedTemplateUrlWithHttpInfo($campaignId) ); $e->setResponseObject($data); break; - case 404: + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SendinBlue\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -1976,14 +1937,14 @@ public function getSharedTemplateUrlWithHttpInfo($campaignId) * * Get a shared template url * - * @param int $campaignId Id of the campaign or template (required) + * @param int $campaign_id Id of the campaign or template (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSharedTemplateUrlAsync($campaignId) + public function getSharedTemplateUrlAsync($campaign_id) { - return $this->getSharedTemplateUrlAsyncWithHttpInfo($campaignId) + return $this->getSharedTemplateUrlAsyncWithHttpInfo($campaign_id) ->then( function ($response) { return $response[0]; @@ -1996,15 +1957,15 @@ function ($response) { * * Get a shared template url * - * @param int $campaignId Id of the campaign or template (required) + * @param int $campaign_id Id of the campaign or template (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSharedTemplateUrlAsyncWithHttpInfo($campaignId) + public function getSharedTemplateUrlAsyncWithHttpInfo($campaign_id) { $returnType = '\SendinBlue\Client\Model\GetSharedTemplateUrl'; - $request = $this->getSharedTemplateUrlRequest($campaignId); + $request = $this->getSharedTemplateUrlRequest($campaign_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2046,17 +2007,17 @@ function ($exception) { /** * Create request for operation 'getSharedTemplateUrl' * - * @param int $campaignId Id of the campaign or template (required) + * @param int $campaign_id Id of the campaign or template (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getSharedTemplateUrlRequest($campaignId) + protected function getSharedTemplateUrlRequest($campaign_id) { - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + // verify the required parameter 'campaign_id' is set + if ($campaign_id === null || (is_array($campaign_id) && count($campaign_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling getSharedTemplateUrl' + 'Missing the required parameter $campaign_id when calling getSharedTemplateUrl' ); } @@ -2069,10 +2030,10 @@ protected function getSharedTemplateUrlRequest($campaignId) // path params - if ($campaignId !== null) { + if ($campaign_id !== null) { $resourcePath = str_replace( '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), + ObjectSerializer::toPathValue($campaign_id), $resourcePath ); } @@ -2132,11 +2093,6 @@ protected function getSharedTemplateUrlRequest($campaignId) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -2163,15 +2119,15 @@ protected function getSharedTemplateUrlRequest($campaignId) * * Send an email campaign immediately, based on campaignId * - * @param int $campaignId Id of the campaign (required) + * @param int $campaign_id Id of the campaign (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function sendEmailCampaignNow($campaignId) + public function sendEmailCampaignNow($campaign_id) { - $this->sendEmailCampaignNowWithHttpInfo($campaignId); + $this->sendEmailCampaignNowWithHttpInfo($campaign_id); } /** @@ -2179,16 +2135,16 @@ public function sendEmailCampaignNow($campaignId) * * Send an email campaign immediately, based on campaignId * - * @param int $campaignId Id of the campaign (required) + * @param int $campaign_id Id of the campaign (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function sendEmailCampaignNowWithHttpInfo($campaignId) + public function sendEmailCampaignNowWithHttpInfo($campaign_id) { $returnType = ''; - $request = $this->sendEmailCampaignNowRequest($campaignId); + $request = $this->sendEmailCampaignNowRequest($campaign_id); try { $options = $this->createHttpClientOption(); @@ -2256,14 +2212,14 @@ public function sendEmailCampaignNowWithHttpInfo($campaignId) * * Send an email campaign immediately, based on campaignId * - * @param int $campaignId Id of the campaign (required) + * @param int $campaign_id Id of the campaign (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function sendEmailCampaignNowAsync($campaignId) + public function sendEmailCampaignNowAsync($campaign_id) { - return $this->sendEmailCampaignNowAsyncWithHttpInfo($campaignId) + return $this->sendEmailCampaignNowAsyncWithHttpInfo($campaign_id) ->then( function ($response) { return $response[0]; @@ -2276,15 +2232,15 @@ function ($response) { * * Send an email campaign immediately, based on campaignId * - * @param int $campaignId Id of the campaign (required) + * @param int $campaign_id Id of the campaign (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function sendEmailCampaignNowAsyncWithHttpInfo($campaignId) + public function sendEmailCampaignNowAsyncWithHttpInfo($campaign_id) { $returnType = ''; - $request = $this->sendEmailCampaignNowRequest($campaignId); + $request = $this->sendEmailCampaignNowRequest($campaign_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2312,17 +2268,17 @@ function ($exception) { /** * Create request for operation 'sendEmailCampaignNow' * - * @param int $campaignId Id of the campaign (required) + * @param int $campaign_id Id of the campaign (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function sendEmailCampaignNowRequest($campaignId) + protected function sendEmailCampaignNowRequest($campaign_id) { - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + // verify the required parameter 'campaign_id' is set + if ($campaign_id === null || (is_array($campaign_id) && count($campaign_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling sendEmailCampaignNow' + 'Missing the required parameter $campaign_id when calling sendEmailCampaignNow' ); } @@ -2335,10 +2291,10 @@ protected function sendEmailCampaignNowRequest($campaignId) // path params - if ($campaignId !== null) { + if ($campaign_id !== null) { $resourcePath = str_replace( '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), + ObjectSerializer::toPathValue($campaign_id), $resourcePath ); } @@ -2398,11 +2354,6 @@ protected function sendEmailCampaignNowRequest($campaignId) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -2429,16 +2380,16 @@ protected function sendEmailCampaignNowRequest($campaignId) * * Send the report of a campaign * - * @param int $campaignId Id of the campaign (required) - * @param \SendinBlue\Client\Model\SendReport $sendReport Values for send a report (required) + * @param int $campaign_id Id of the campaign (required) + * @param \SendinBlue\Client\Model\SendReport $send_report Values for send a report (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function sendReport($campaignId, $sendReport) + public function sendReport($campaign_id, $send_report) { - $this->sendReportWithHttpInfo($campaignId, $sendReport); + $this->sendReportWithHttpInfo($campaign_id, $send_report); } /** @@ -2446,17 +2397,17 @@ public function sendReport($campaignId, $sendReport) * * Send the report of a campaign * - * @param int $campaignId Id of the campaign (required) - * @param \SendinBlue\Client\Model\SendReport $sendReport Values for send a report (required) + * @param int $campaign_id Id of the campaign (required) + * @param \SendinBlue\Client\Model\SendReport $send_report Values for send a report (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function sendReportWithHttpInfo($campaignId, $sendReport) + public function sendReportWithHttpInfo($campaign_id, $send_report) { $returnType = ''; - $request = $this->sendReportRequest($campaignId, $sendReport); + $request = $this->sendReportRequest($campaign_id, $send_report); try { $options = $this->createHttpClientOption(); @@ -2516,15 +2467,15 @@ public function sendReportWithHttpInfo($campaignId, $sendReport) * * Send the report of a campaign * - * @param int $campaignId Id of the campaign (required) - * @param \SendinBlue\Client\Model\SendReport $sendReport Values for send a report (required) + * @param int $campaign_id Id of the campaign (required) + * @param \SendinBlue\Client\Model\SendReport $send_report Values for send a report (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function sendReportAsync($campaignId, $sendReport) + public function sendReportAsync($campaign_id, $send_report) { - return $this->sendReportAsyncWithHttpInfo($campaignId, $sendReport) + return $this->sendReportAsyncWithHttpInfo($campaign_id, $send_report) ->then( function ($response) { return $response[0]; @@ -2537,16 +2488,16 @@ function ($response) { * * Send the report of a campaign * - * @param int $campaignId Id of the campaign (required) - * @param \SendinBlue\Client\Model\SendReport $sendReport Values for send a report (required) + * @param int $campaign_id Id of the campaign (required) + * @param \SendinBlue\Client\Model\SendReport $send_report Values for send a report (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function sendReportAsyncWithHttpInfo($campaignId, $sendReport) + public function sendReportAsyncWithHttpInfo($campaign_id, $send_report) { $returnType = ''; - $request = $this->sendReportRequest($campaignId, $sendReport); + $request = $this->sendReportRequest($campaign_id, $send_report); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2574,24 +2525,24 @@ function ($exception) { /** * Create request for operation 'sendReport' * - * @param int $campaignId Id of the campaign (required) - * @param \SendinBlue\Client\Model\SendReport $sendReport Values for send a report (required) + * @param int $campaign_id Id of the campaign (required) + * @param \SendinBlue\Client\Model\SendReport $send_report Values for send a report (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function sendReportRequest($campaignId, $sendReport) + protected function sendReportRequest($campaign_id, $send_report) { - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + // verify the required parameter 'campaign_id' is set + if ($campaign_id === null || (is_array($campaign_id) && count($campaign_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling sendReport' + 'Missing the required parameter $campaign_id when calling sendReport' ); } - // verify the required parameter 'sendReport' is set - if ($sendReport === null || (is_array($sendReport) && count($sendReport) === 0)) { + // verify the required parameter 'send_report' is set + if ($send_report === null || (is_array($send_report) && count($send_report) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $sendReport when calling sendReport' + 'Missing the required parameter $send_report when calling sendReport' ); } @@ -2604,18 +2555,18 @@ protected function sendReportRequest($campaignId, $sendReport) // path params - if ($campaignId !== null) { + if ($campaign_id !== null) { $resourcePath = str_replace( '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), + ObjectSerializer::toPathValue($campaign_id), $resourcePath ); } // body params $_tempBody = null; - if (isset($sendReport)) { - $_tempBody = $sendReport; + if (isset($send_report)) { + $_tempBody = $send_report; } if ($multipart) { @@ -2670,11 +2621,6 @@ protected function sendReportRequest($campaignId, $sendReport) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -2701,16 +2647,16 @@ protected function sendReportRequest($campaignId, $sendReport) * * Send an email campaign to your test list * - * @param int $campaignId Id of the campaign (required) - * @param \SendinBlue\Client\Model\SendTestEmail $emailTo emailTo (required) + * @param int $campaign_id Id of the campaign (required) + * @param \SendinBlue\Client\Model\SendTestEmail $email_to email_to (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function sendTestEmail($campaignId, $emailTo) + public function sendTestEmail($campaign_id, $email_to) { - $this->sendTestEmailWithHttpInfo($campaignId, $emailTo); + $this->sendTestEmailWithHttpInfo($campaign_id, $email_to); } /** @@ -2718,17 +2664,17 @@ public function sendTestEmail($campaignId, $emailTo) * * Send an email campaign to your test list * - * @param int $campaignId Id of the campaign (required) - * @param \SendinBlue\Client\Model\SendTestEmail $emailTo (required) + * @param int $campaign_id Id of the campaign (required) + * @param \SendinBlue\Client\Model\SendTestEmail $email_to (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function sendTestEmailWithHttpInfo($campaignId, $emailTo) + public function sendTestEmailWithHttpInfo($campaign_id, $email_to) { $returnType = ''; - $request = $this->sendTestEmailRequest($campaignId, $emailTo); + $request = $this->sendTestEmailRequest($campaign_id, $email_to); try { $options = $this->createHttpClientOption(); @@ -2788,15 +2734,15 @@ public function sendTestEmailWithHttpInfo($campaignId, $emailTo) * * Send an email campaign to your test list * - * @param int $campaignId Id of the campaign (required) - * @param \SendinBlue\Client\Model\SendTestEmail $emailTo (required) + * @param int $campaign_id Id of the campaign (required) + * @param \SendinBlue\Client\Model\SendTestEmail $email_to (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function sendTestEmailAsync($campaignId, $emailTo) + public function sendTestEmailAsync($campaign_id, $email_to) { - return $this->sendTestEmailAsyncWithHttpInfo($campaignId, $emailTo) + return $this->sendTestEmailAsyncWithHttpInfo($campaign_id, $email_to) ->then( function ($response) { return $response[0]; @@ -2809,16 +2755,16 @@ function ($response) { * * Send an email campaign to your test list * - * @param int $campaignId Id of the campaign (required) - * @param \SendinBlue\Client\Model\SendTestEmail $emailTo (required) + * @param int $campaign_id Id of the campaign (required) + * @param \SendinBlue\Client\Model\SendTestEmail $email_to (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function sendTestEmailAsyncWithHttpInfo($campaignId, $emailTo) + public function sendTestEmailAsyncWithHttpInfo($campaign_id, $email_to) { $returnType = ''; - $request = $this->sendTestEmailRequest($campaignId, $emailTo); + $request = $this->sendTestEmailRequest($campaign_id, $email_to); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2846,24 +2792,24 @@ function ($exception) { /** * Create request for operation 'sendTestEmail' * - * @param int $campaignId Id of the campaign (required) - * @param \SendinBlue\Client\Model\SendTestEmail $emailTo (required) + * @param int $campaign_id Id of the campaign (required) + * @param \SendinBlue\Client\Model\SendTestEmail $email_to (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function sendTestEmailRequest($campaignId, $emailTo) + protected function sendTestEmailRequest($campaign_id, $email_to) { - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + // verify the required parameter 'campaign_id' is set + if ($campaign_id === null || (is_array($campaign_id) && count($campaign_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling sendTestEmail' + 'Missing the required parameter $campaign_id when calling sendTestEmail' ); } - // verify the required parameter 'emailTo' is set - if ($emailTo === null || (is_array($emailTo) && count($emailTo) === 0)) { + // verify the required parameter 'email_to' is set + if ($email_to === null || (is_array($email_to) && count($email_to) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $emailTo when calling sendTestEmail' + 'Missing the required parameter $email_to when calling sendTestEmail' ); } @@ -2876,18 +2822,18 @@ protected function sendTestEmailRequest($campaignId, $emailTo) // path params - if ($campaignId !== null) { + if ($campaign_id !== null) { $resourcePath = str_replace( '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), + ObjectSerializer::toPathValue($campaign_id), $resourcePath ); } // body params $_tempBody = null; - if (isset($emailTo)) { - $_tempBody = $emailTo; + if (isset($email_to)) { + $_tempBody = $email_to; } if ($multipart) { @@ -2942,11 +2888,6 @@ protected function sendTestEmailRequest($campaignId, $emailTo) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -2973,16 +2914,16 @@ protected function sendTestEmailRequest($campaignId, $emailTo) * * Update an email campaign status * - * @param int $campaignId Id of the campaign (required) + * @param int $campaign_id Id of the campaign (required) * @param \SendinBlue\Client\Model\UpdateCampaignStatus $status Status of the campaign (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function updateCampaignStatus($campaignId, $status) + public function updateCampaignStatus($campaign_id, $status) { - $this->updateCampaignStatusWithHttpInfo($campaignId, $status); + $this->updateCampaignStatusWithHttpInfo($campaign_id, $status); } /** @@ -2990,17 +2931,17 @@ public function updateCampaignStatus($campaignId, $status) * * Update an email campaign status * - * @param int $campaignId Id of the campaign (required) + * @param int $campaign_id Id of the campaign (required) * @param \SendinBlue\Client\Model\UpdateCampaignStatus $status Status of the campaign (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function updateCampaignStatusWithHttpInfo($campaignId, $status) + public function updateCampaignStatusWithHttpInfo($campaign_id, $status) { $returnType = ''; - $request = $this->updateCampaignStatusRequest($campaignId, $status); + $request = $this->updateCampaignStatusRequest($campaign_id, $status); try { $options = $this->createHttpClientOption(); @@ -3060,15 +3001,15 @@ public function updateCampaignStatusWithHttpInfo($campaignId, $status) * * Update an email campaign status * - * @param int $campaignId Id of the campaign (required) + * @param int $campaign_id Id of the campaign (required) * @param \SendinBlue\Client\Model\UpdateCampaignStatus $status Status of the campaign (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateCampaignStatusAsync($campaignId, $status) + public function updateCampaignStatusAsync($campaign_id, $status) { - return $this->updateCampaignStatusAsyncWithHttpInfo($campaignId, $status) + return $this->updateCampaignStatusAsyncWithHttpInfo($campaign_id, $status) ->then( function ($response) { return $response[0]; @@ -3081,16 +3022,16 @@ function ($response) { * * Update an email campaign status * - * @param int $campaignId Id of the campaign (required) + * @param int $campaign_id Id of the campaign (required) * @param \SendinBlue\Client\Model\UpdateCampaignStatus $status Status of the campaign (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateCampaignStatusAsyncWithHttpInfo($campaignId, $status) + public function updateCampaignStatusAsyncWithHttpInfo($campaign_id, $status) { $returnType = ''; - $request = $this->updateCampaignStatusRequest($campaignId, $status); + $request = $this->updateCampaignStatusRequest($campaign_id, $status); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3118,18 +3059,18 @@ function ($exception) { /** * Create request for operation 'updateCampaignStatus' * - * @param int $campaignId Id of the campaign (required) + * @param int $campaign_id Id of the campaign (required) * @param \SendinBlue\Client\Model\UpdateCampaignStatus $status Status of the campaign (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function updateCampaignStatusRequest($campaignId, $status) + protected function updateCampaignStatusRequest($campaign_id, $status) { - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + // verify the required parameter 'campaign_id' is set + if ($campaign_id === null || (is_array($campaign_id) && count($campaign_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling updateCampaignStatus' + 'Missing the required parameter $campaign_id when calling updateCampaignStatus' ); } // verify the required parameter 'status' is set @@ -3148,10 +3089,10 @@ protected function updateCampaignStatusRequest($campaignId, $status) // path params - if ($campaignId !== null) { + if ($campaign_id !== null) { $resourcePath = str_replace( '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), + ObjectSerializer::toPathValue($campaign_id), $resourcePath ); } @@ -3214,11 +3155,6 @@ protected function updateCampaignStatusRequest($campaignId, $status) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -3245,16 +3181,16 @@ protected function updateCampaignStatusRequest($campaignId, $status) * * Update an email campaign * - * @param int $campaignId Id of the campaign (required) - * @param \SendinBlue\Client\Model\UpdateEmailCampaign $emailCampaign Values to update a campaign (required) + * @param int $campaign_id Id of the campaign (required) + * @param \SendinBlue\Client\Model\UpdateEmailCampaign $email_campaign Values to update a campaign (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function updateEmailCampaign($campaignId, $emailCampaign) + public function updateEmailCampaign($campaign_id, $email_campaign) { - $this->updateEmailCampaignWithHttpInfo($campaignId, $emailCampaign); + $this->updateEmailCampaignWithHttpInfo($campaign_id, $email_campaign); } /** @@ -3262,17 +3198,17 @@ public function updateEmailCampaign($campaignId, $emailCampaign) * * Update an email campaign * - * @param int $campaignId Id of the campaign (required) - * @param \SendinBlue\Client\Model\UpdateEmailCampaign $emailCampaign Values to update a campaign (required) + * @param int $campaign_id Id of the campaign (required) + * @param \SendinBlue\Client\Model\UpdateEmailCampaign $email_campaign Values to update a campaign (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function updateEmailCampaignWithHttpInfo($campaignId, $emailCampaign) + public function updateEmailCampaignWithHttpInfo($campaign_id, $email_campaign) { $returnType = ''; - $request = $this->updateEmailCampaignRequest($campaignId, $emailCampaign); + $request = $this->updateEmailCampaignRequest($campaign_id, $email_campaign); try { $options = $this->createHttpClientOption(); @@ -3332,15 +3268,15 @@ public function updateEmailCampaignWithHttpInfo($campaignId, $emailCampaign) * * Update an email campaign * - * @param int $campaignId Id of the campaign (required) - * @param \SendinBlue\Client\Model\UpdateEmailCampaign $emailCampaign Values to update a campaign (required) + * @param int $campaign_id Id of the campaign (required) + * @param \SendinBlue\Client\Model\UpdateEmailCampaign $email_campaign Values to update a campaign (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateEmailCampaignAsync($campaignId, $emailCampaign) + public function updateEmailCampaignAsync($campaign_id, $email_campaign) { - return $this->updateEmailCampaignAsyncWithHttpInfo($campaignId, $emailCampaign) + return $this->updateEmailCampaignAsyncWithHttpInfo($campaign_id, $email_campaign) ->then( function ($response) { return $response[0]; @@ -3353,16 +3289,16 @@ function ($response) { * * Update an email campaign * - * @param int $campaignId Id of the campaign (required) - * @param \SendinBlue\Client\Model\UpdateEmailCampaign $emailCampaign Values to update a campaign (required) + * @param int $campaign_id Id of the campaign (required) + * @param \SendinBlue\Client\Model\UpdateEmailCampaign $email_campaign Values to update a campaign (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateEmailCampaignAsyncWithHttpInfo($campaignId, $emailCampaign) + public function updateEmailCampaignAsyncWithHttpInfo($campaign_id, $email_campaign) { $returnType = ''; - $request = $this->updateEmailCampaignRequest($campaignId, $emailCampaign); + $request = $this->updateEmailCampaignRequest($campaign_id, $email_campaign); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3390,24 +3326,24 @@ function ($exception) { /** * Create request for operation 'updateEmailCampaign' * - * @param int $campaignId Id of the campaign (required) - * @param \SendinBlue\Client\Model\UpdateEmailCampaign $emailCampaign Values to update a campaign (required) + * @param int $campaign_id Id of the campaign (required) + * @param \SendinBlue\Client\Model\UpdateEmailCampaign $email_campaign Values to update a campaign (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function updateEmailCampaignRequest($campaignId, $emailCampaign) + protected function updateEmailCampaignRequest($campaign_id, $email_campaign) { - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + // verify the required parameter 'campaign_id' is set + if ($campaign_id === null || (is_array($campaign_id) && count($campaign_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling updateEmailCampaign' + 'Missing the required parameter $campaign_id when calling updateEmailCampaign' ); } - // verify the required parameter 'emailCampaign' is set - if ($emailCampaign === null || (is_array($emailCampaign) && count($emailCampaign) === 0)) { + // verify the required parameter 'email_campaign' is set + if ($email_campaign === null || (is_array($email_campaign) && count($email_campaign) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $emailCampaign when calling updateEmailCampaign' + 'Missing the required parameter $email_campaign when calling updateEmailCampaign' ); } @@ -3420,18 +3356,18 @@ protected function updateEmailCampaignRequest($campaignId, $emailCampaign) // path params - if ($campaignId !== null) { + if ($campaign_id !== null) { $resourcePath = str_replace( '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), + ObjectSerializer::toPathValue($campaign_id), $resourcePath ); } // body params $_tempBody = null; - if (isset($emailCampaign)) { - $_tempBody = $emailCampaign; + if (isset($email_campaign)) { + $_tempBody = $email_campaign; } if ($multipart) { @@ -3486,11 +3422,6 @@ protected function updateEmailCampaignRequest($campaignId, $emailCampaign) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -3517,15 +3448,15 @@ protected function updateEmailCampaignRequest($campaignId, $emailCampaign) * * Upload an image to your account's image gallery * - * @param \SendinBlue\Client\Model\UploadImageToGallery $uploadImage Parameters to upload an image (required) + * @param \SendinBlue\Client\Model\UploadImageToGallery $upload_image Parameters to upload an image (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function uploadImageToGallery($uploadImage) + public function uploadImageToGallery($upload_image) { - $this->uploadImageToGalleryWithHttpInfo($uploadImage); + $this->uploadImageToGalleryWithHttpInfo($upload_image); } /** @@ -3533,16 +3464,16 @@ public function uploadImageToGallery($uploadImage) * * Upload an image to your account's image gallery * - * @param \SendinBlue\Client\Model\UploadImageToGallery $uploadImage Parameters to upload an image (required) + * @param \SendinBlue\Client\Model\UploadImageToGallery $upload_image Parameters to upload an image (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function uploadImageToGalleryWithHttpInfo($uploadImage) + public function uploadImageToGalleryWithHttpInfo($upload_image) { $returnType = ''; - $request = $this->uploadImageToGalleryRequest($uploadImage); + $request = $this->uploadImageToGalleryRequest($upload_image); try { $options = $this->createHttpClientOption(); @@ -3594,14 +3525,14 @@ public function uploadImageToGalleryWithHttpInfo($uploadImage) * * Upload an image to your account's image gallery * - * @param \SendinBlue\Client\Model\UploadImageToGallery $uploadImage Parameters to upload an image (required) + * @param \SendinBlue\Client\Model\UploadImageToGallery $upload_image Parameters to upload an image (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function uploadImageToGalleryAsync($uploadImage) + public function uploadImageToGalleryAsync($upload_image) { - return $this->uploadImageToGalleryAsyncWithHttpInfo($uploadImage) + return $this->uploadImageToGalleryAsyncWithHttpInfo($upload_image) ->then( function ($response) { return $response[0]; @@ -3614,15 +3545,15 @@ function ($response) { * * Upload an image to your account's image gallery * - * @param \SendinBlue\Client\Model\UploadImageToGallery $uploadImage Parameters to upload an image (required) + * @param \SendinBlue\Client\Model\UploadImageToGallery $upload_image Parameters to upload an image (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function uploadImageToGalleryAsyncWithHttpInfo($uploadImage) + public function uploadImageToGalleryAsyncWithHttpInfo($upload_image) { $returnType = ''; - $request = $this->uploadImageToGalleryRequest($uploadImage); + $request = $this->uploadImageToGalleryRequest($upload_image); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3650,17 +3581,17 @@ function ($exception) { /** * Create request for operation 'uploadImageToGallery' * - * @param \SendinBlue\Client\Model\UploadImageToGallery $uploadImage Parameters to upload an image (required) + * @param \SendinBlue\Client\Model\UploadImageToGallery $upload_image Parameters to upload an image (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function uploadImageToGalleryRequest($uploadImage) + protected function uploadImageToGalleryRequest($upload_image) { - // verify the required parameter 'uploadImage' is set - if ($uploadImage === null || (is_array($uploadImage) && count($uploadImage) === 0)) { + // verify the required parameter 'upload_image' is set + if ($upload_image === null || (is_array($upload_image) && count($upload_image) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $uploadImage when calling uploadImageToGallery' + 'Missing the required parameter $upload_image when calling uploadImageToGallery' ); } @@ -3675,8 +3606,8 @@ protected function uploadImageToGalleryRequest($uploadImage) // body params $_tempBody = null; - if (isset($uploadImage)) { - $_tempBody = $uploadImage; + if (isset($upload_image)) { + $_tempBody = $upload_image; } if ($multipart) { @@ -3731,11 +3662,6 @@ protected function uploadImageToGalleryRequest($uploadImage) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { diff --git a/lib/Api/FoldersApi.php b/lib/Api/FoldersApi.php index 56360b0c..603751ce 100644 --- a/lib/Api/FoldersApi.php +++ b/lib/Api/FoldersApi.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -92,15 +92,15 @@ public function getConfig() * * Create a folder * - * @param \SendinBlue\Client\Model\CreateUpdateFolder $createFolder Name of the folder (required) + * @param \SendinBlue\Client\Model\CreateUpdateFolder $create_folder Name of the folder (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\CreateModel */ - public function createFolder($createFolder) + public function createFolder($create_folder) { - list($response) = $this->createFolderWithHttpInfo($createFolder); + list($response) = $this->createFolderWithHttpInfo($create_folder); return $response; } @@ -109,16 +109,16 @@ public function createFolder($createFolder) * * Create a folder * - * @param \SendinBlue\Client\Model\CreateUpdateFolder $createFolder Name of the folder (required) + * @param \SendinBlue\Client\Model\CreateUpdateFolder $create_folder Name of the folder (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\CreateModel, HTTP status code, HTTP response headers (array of strings) */ - public function createFolderWithHttpInfo($createFolder) + public function createFolderWithHttpInfo($create_folder) { $returnType = '\SendinBlue\Client\Model\CreateModel'; - $request = $this->createFolderRequest($createFolder); + $request = $this->createFolderRequest($create_folder); try { $options = $this->createHttpClientOption(); @@ -192,14 +192,14 @@ public function createFolderWithHttpInfo($createFolder) * * Create a folder * - * @param \SendinBlue\Client\Model\CreateUpdateFolder $createFolder Name of the folder (required) + * @param \SendinBlue\Client\Model\CreateUpdateFolder $create_folder Name of the folder (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createFolderAsync($createFolder) + public function createFolderAsync($create_folder) { - return $this->createFolderAsyncWithHttpInfo($createFolder) + return $this->createFolderAsyncWithHttpInfo($create_folder) ->then( function ($response) { return $response[0]; @@ -212,15 +212,15 @@ function ($response) { * * Create a folder * - * @param \SendinBlue\Client\Model\CreateUpdateFolder $createFolder Name of the folder (required) + * @param \SendinBlue\Client\Model\CreateUpdateFolder $create_folder Name of the folder (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createFolderAsyncWithHttpInfo($createFolder) + public function createFolderAsyncWithHttpInfo($create_folder) { $returnType = '\SendinBlue\Client\Model\CreateModel'; - $request = $this->createFolderRequest($createFolder); + $request = $this->createFolderRequest($create_folder); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -262,17 +262,17 @@ function ($exception) { /** * Create request for operation 'createFolder' * - * @param \SendinBlue\Client\Model\CreateUpdateFolder $createFolder Name of the folder (required) + * @param \SendinBlue\Client\Model\CreateUpdateFolder $create_folder Name of the folder (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function createFolderRequest($createFolder) + protected function createFolderRequest($create_folder) { - // verify the required parameter 'createFolder' is set - if ($createFolder === null || (is_array($createFolder) && count($createFolder) === 0)) { + // verify the required parameter 'create_folder' is set + if ($create_folder === null || (is_array($create_folder) && count($create_folder) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $createFolder when calling createFolder' + 'Missing the required parameter $create_folder when calling createFolder' ); } @@ -287,8 +287,8 @@ protected function createFolderRequest($createFolder) // body params $_tempBody = null; - if (isset($createFolder)) { - $_tempBody = $createFolder; + if (isset($create_folder)) { + $_tempBody = $create_folder; } if ($multipart) { @@ -343,11 +343,6 @@ protected function createFolderRequest($createFolder) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -374,15 +369,15 @@ protected function createFolderRequest($createFolder) * * Delete a folder (and all its lists) * - * @param int $folderId Id of the folder (required) + * @param int $folder_id Id of the folder (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function deleteFolder($folderId) + public function deleteFolder($folder_id) { - $this->deleteFolderWithHttpInfo($folderId); + $this->deleteFolderWithHttpInfo($folder_id); } /** @@ -390,16 +385,16 @@ public function deleteFolder($folderId) * * Delete a folder (and all its lists) * - * @param int $folderId Id of the folder (required) + * @param int $folder_id Id of the folder (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteFolderWithHttpInfo($folderId) + public function deleteFolderWithHttpInfo($folder_id) { $returnType = ''; - $request = $this->deleteFolderRequest($folderId); + $request = $this->deleteFolderRequest($folder_id); try { $options = $this->createHttpClientOption(); @@ -433,7 +428,7 @@ public function deleteFolderWithHttpInfo($folderId) } catch (ApiException $e) { switch ($e->getCode()) { - case 400: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -441,7 +436,7 @@ public function deleteFolderWithHttpInfo($folderId) ); $e->setResponseObject($data); break; - case 404: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -459,14 +454,14 @@ public function deleteFolderWithHttpInfo($folderId) * * Delete a folder (and all its lists) * - * @param int $folderId Id of the folder (required) + * @param int $folder_id Id of the folder (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteFolderAsync($folderId) + public function deleteFolderAsync($folder_id) { - return $this->deleteFolderAsyncWithHttpInfo($folderId) + return $this->deleteFolderAsyncWithHttpInfo($folder_id) ->then( function ($response) { return $response[0]; @@ -479,15 +474,15 @@ function ($response) { * * Delete a folder (and all its lists) * - * @param int $folderId Id of the folder (required) + * @param int $folder_id Id of the folder (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteFolderAsyncWithHttpInfo($folderId) + public function deleteFolderAsyncWithHttpInfo($folder_id) { $returnType = ''; - $request = $this->deleteFolderRequest($folderId); + $request = $this->deleteFolderRequest($folder_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -515,17 +510,17 @@ function ($exception) { /** * Create request for operation 'deleteFolder' * - * @param int $folderId Id of the folder (required) + * @param int $folder_id Id of the folder (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function deleteFolderRequest($folderId) + protected function deleteFolderRequest($folder_id) { - // verify the required parameter 'folderId' is set - if ($folderId === null || (is_array($folderId) && count($folderId) === 0)) { + // verify the required parameter 'folder_id' is set + if ($folder_id === null || (is_array($folder_id) && count($folder_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $folderId when calling deleteFolder' + 'Missing the required parameter $folder_id when calling deleteFolder' ); } @@ -538,10 +533,10 @@ protected function deleteFolderRequest($folderId) // path params - if ($folderId !== null) { + if ($folder_id !== null) { $resourcePath = str_replace( '{' . 'folderId' . '}', - ObjectSerializer::toPathValue($folderId), + ObjectSerializer::toPathValue($folder_id), $resourcePath ); } @@ -601,11 +596,6 @@ protected function deleteFolderRequest($folderId) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -632,15 +622,15 @@ protected function deleteFolderRequest($folderId) * * Returns a folder's details * - * @param int $folderId id of the folder (required) + * @param int $folder_id id of the folder (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\GetFolder */ - public function getFolder($folderId) + public function getFolder($folder_id) { - list($response) = $this->getFolderWithHttpInfo($folderId); + list($response) = $this->getFolderWithHttpInfo($folder_id); return $response; } @@ -649,16 +639,16 @@ public function getFolder($folderId) * * Returns a folder's details * - * @param int $folderId id of the folder (required) + * @param int $folder_id id of the folder (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\GetFolder, HTTP status code, HTTP response headers (array of strings) */ - public function getFolderWithHttpInfo($folderId) + public function getFolderWithHttpInfo($folder_id) { $returnType = '\SendinBlue\Client\Model\GetFolder'; - $request = $this->getFolderRequest($folderId); + $request = $this->getFolderRequest($folder_id); try { $options = $this->createHttpClientOption(); @@ -714,7 +704,7 @@ public function getFolderWithHttpInfo($folderId) ); $e->setResponseObject($data); break; - case 400: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -722,7 +712,7 @@ public function getFolderWithHttpInfo($folderId) ); $e->setResponseObject($data); break; - case 404: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -740,14 +730,14 @@ public function getFolderWithHttpInfo($folderId) * * Returns a folder's details * - * @param int $folderId id of the folder (required) + * @param int $folder_id id of the folder (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getFolderAsync($folderId) + public function getFolderAsync($folder_id) { - return $this->getFolderAsyncWithHttpInfo($folderId) + return $this->getFolderAsyncWithHttpInfo($folder_id) ->then( function ($response) { return $response[0]; @@ -760,15 +750,15 @@ function ($response) { * * Returns a folder's details * - * @param int $folderId id of the folder (required) + * @param int $folder_id id of the folder (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getFolderAsyncWithHttpInfo($folderId) + public function getFolderAsyncWithHttpInfo($folder_id) { $returnType = '\SendinBlue\Client\Model\GetFolder'; - $request = $this->getFolderRequest($folderId); + $request = $this->getFolderRequest($folder_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -810,17 +800,17 @@ function ($exception) { /** * Create request for operation 'getFolder' * - * @param int $folderId id of the folder (required) + * @param int $folder_id id of the folder (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getFolderRequest($folderId) + protected function getFolderRequest($folder_id) { - // verify the required parameter 'folderId' is set - if ($folderId === null || (is_array($folderId) && count($folderId) === 0)) { + // verify the required parameter 'folder_id' is set + if ($folder_id === null || (is_array($folder_id) && count($folder_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $folderId when calling getFolder' + 'Missing the required parameter $folder_id when calling getFolder' ); } @@ -833,10 +823,10 @@ protected function getFolderRequest($folderId) // path params - if ($folderId !== null) { + if ($folder_id !== null) { $resourcePath = str_replace( '{' . 'folderId' . '}', - ObjectSerializer::toPathValue($folderId), + ObjectSerializer::toPathValue($folder_id), $resourcePath ); } @@ -896,11 +886,6 @@ protected function getFolderRequest($folderId) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -927,18 +912,18 @@ protected function getFolderRequest($folderId) * * Get lists in a folder * - * @param int $folderId Id of the folder (required) + * @param int $folder_id Id of the folder (required) * @param int $limit Number of documents per page (optional, default to 10) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\GetFolderLists */ - public function getFolderLists($folderId, $limit = '10', $offset = '0', $sort = 'desc') + public function getFolderLists($folder_id, $limit = '10', $offset = '0', $sort = 'desc') { - list($response) = $this->getFolderListsWithHttpInfo($folderId, $limit, $offset, $sort); + list($response) = $this->getFolderListsWithHttpInfo($folder_id, $limit, $offset, $sort); return $response; } @@ -947,19 +932,19 @@ public function getFolderLists($folderId, $limit = '10', $offset = '0', $sort = * * Get lists in a folder * - * @param int $folderId Id of the folder (required) + * @param int $folder_id Id of the folder (required) * @param int $limit Number of documents per page (optional, default to 10) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\GetFolderLists, HTTP status code, HTTP response headers (array of strings) */ - public function getFolderListsWithHttpInfo($folderId, $limit = '10', $offset = '0', $sort = 'desc') + public function getFolderListsWithHttpInfo($folder_id, $limit = '10', $offset = '0', $sort = 'desc') { $returnType = '\SendinBlue\Client\Model\GetFolderLists'; - $request = $this->getFolderListsRequest($folderId, $limit, $offset, $sort); + $request = $this->getFolderListsRequest($folder_id, $limit, $offset, $sort); try { $options = $this->createHttpClientOption(); @@ -1015,7 +1000,7 @@ public function getFolderListsWithHttpInfo($folderId, $limit = '10', $offset = ' ); $e->setResponseObject($data); break; - case 400: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -1023,7 +1008,7 @@ public function getFolderListsWithHttpInfo($folderId, $limit = '10', $offset = ' ); $e->setResponseObject($data); break; - case 404: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -1041,17 +1026,17 @@ public function getFolderListsWithHttpInfo($folderId, $limit = '10', $offset = ' * * Get lists in a folder * - * @param int $folderId Id of the folder (required) + * @param int $folder_id Id of the folder (required) * @param int $limit Number of documents per page (optional, default to 10) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getFolderListsAsync($folderId, $limit = '10', $offset = '0', $sort = 'desc') + public function getFolderListsAsync($folder_id, $limit = '10', $offset = '0', $sort = 'desc') { - return $this->getFolderListsAsyncWithHttpInfo($folderId, $limit, $offset, $sort) + return $this->getFolderListsAsyncWithHttpInfo($folder_id, $limit, $offset, $sort) ->then( function ($response) { return $response[0]; @@ -1064,18 +1049,18 @@ function ($response) { * * Get lists in a folder * - * @param int $folderId Id of the folder (required) + * @param int $folder_id Id of the folder (required) * @param int $limit Number of documents per page (optional, default to 10) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getFolderListsAsyncWithHttpInfo($folderId, $limit = '10', $offset = '0', $sort = 'desc') + public function getFolderListsAsyncWithHttpInfo($folder_id, $limit = '10', $offset = '0', $sort = 'desc') { $returnType = '\SendinBlue\Client\Model\GetFolderLists'; - $request = $this->getFolderListsRequest($folderId, $limit, $offset, $sort); + $request = $this->getFolderListsRequest($folder_id, $limit, $offset, $sort); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1117,20 +1102,20 @@ function ($exception) { /** * Create request for operation 'getFolderLists' * - * @param int $folderId Id of the folder (required) + * @param int $folder_id Id of the folder (required) * @param int $limit Number of documents per page (optional, default to 10) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getFolderListsRequest($folderId, $limit = '10', $offset = '0', $sort = 'desc') + protected function getFolderListsRequest($folder_id, $limit = '10', $offset = '0', $sort = 'desc') { - // verify the required parameter 'folderId' is set - if ($folderId === null || (is_array($folderId) && count($folderId) === 0)) { + // verify the required parameter 'folder_id' is set + if ($folder_id === null || (is_array($folder_id) && count($folder_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $folderId when calling getFolderLists' + 'Missing the required parameter $folder_id when calling getFolderLists' ); } if ($limit !== null && $limit > 50) { @@ -1159,10 +1144,10 @@ protected function getFolderListsRequest($folderId, $limit = '10', $offset = '0' } // path params - if ($folderId !== null) { + if ($folder_id !== null) { $resourcePath = str_replace( '{' . 'folderId' . '}', - ObjectSerializer::toPathValue($folderId), + ObjectSerializer::toPathValue($folder_id), $resourcePath ); } @@ -1222,11 +1207,6 @@ protected function getFolderListsRequest($folderId, $limit = '10', $offset = '0' if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1255,7 +1235,7 @@ protected function getFolderListsRequest($folderId, $limit = '10', $offset = '0' * * @param int $limit Number of documents per page (required) * @param int $offset Index of the first document of the page (required) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1274,7 +1254,7 @@ public function getFolders($limit, $offset, $sort = 'desc') * * @param int $limit Number of documents per page (required) * @param int $offset Index of the first document of the page (required) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1359,7 +1339,7 @@ public function getFoldersWithHttpInfo($limit, $offset, $sort = 'desc') * * @param int $limit Number of documents per page (required) * @param int $offset Index of the first document of the page (required) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1381,7 +1361,7 @@ function ($response) { * * @param int $limit Number of documents per page (required) * @param int $offset Index of the first document of the page (required) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1433,7 +1413,7 @@ function ($exception) { * * @param int $limit Number of documents per page (required) * @param int $offset Index of the first document of the page (required) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -1533,11 +1513,6 @@ protected function getFoldersRequest($limit, $offset, $sort = 'desc') if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1564,16 +1539,16 @@ protected function getFoldersRequest($limit, $offset, $sort = 'desc') * * Update a folder * - * @param int $folderId Id of the folder (required) - * @param \SendinBlue\Client\Model\CreateUpdateFolder $updateFolder Name of the folder (required) + * @param int $folder_id Id of the folder (required) + * @param \SendinBlue\Client\Model\CreateUpdateFolder $update_folder Name of the folder (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function updateFolder($folderId, $updateFolder) + public function updateFolder($folder_id, $update_folder) { - $this->updateFolderWithHttpInfo($folderId, $updateFolder); + $this->updateFolderWithHttpInfo($folder_id, $update_folder); } /** @@ -1581,17 +1556,17 @@ public function updateFolder($folderId, $updateFolder) * * Update a folder * - * @param int $folderId Id of the folder (required) - * @param \SendinBlue\Client\Model\CreateUpdateFolder $updateFolder Name of the folder (required) + * @param int $folder_id Id of the folder (required) + * @param \SendinBlue\Client\Model\CreateUpdateFolder $update_folder Name of the folder (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function updateFolderWithHttpInfo($folderId, $updateFolder) + public function updateFolderWithHttpInfo($folder_id, $update_folder) { $returnType = ''; - $request = $this->updateFolderRequest($folderId, $updateFolder); + $request = $this->updateFolderRequest($folder_id, $update_folder); try { $options = $this->createHttpClientOption(); @@ -1651,15 +1626,15 @@ public function updateFolderWithHttpInfo($folderId, $updateFolder) * * Update a folder * - * @param int $folderId Id of the folder (required) - * @param \SendinBlue\Client\Model\CreateUpdateFolder $updateFolder Name of the folder (required) + * @param int $folder_id Id of the folder (required) + * @param \SendinBlue\Client\Model\CreateUpdateFolder $update_folder Name of the folder (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateFolderAsync($folderId, $updateFolder) + public function updateFolderAsync($folder_id, $update_folder) { - return $this->updateFolderAsyncWithHttpInfo($folderId, $updateFolder) + return $this->updateFolderAsyncWithHttpInfo($folder_id, $update_folder) ->then( function ($response) { return $response[0]; @@ -1672,16 +1647,16 @@ function ($response) { * * Update a folder * - * @param int $folderId Id of the folder (required) - * @param \SendinBlue\Client\Model\CreateUpdateFolder $updateFolder Name of the folder (required) + * @param int $folder_id Id of the folder (required) + * @param \SendinBlue\Client\Model\CreateUpdateFolder $update_folder Name of the folder (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateFolderAsyncWithHttpInfo($folderId, $updateFolder) + public function updateFolderAsyncWithHttpInfo($folder_id, $update_folder) { $returnType = ''; - $request = $this->updateFolderRequest($folderId, $updateFolder); + $request = $this->updateFolderRequest($folder_id, $update_folder); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1709,24 +1684,24 @@ function ($exception) { /** * Create request for operation 'updateFolder' * - * @param int $folderId Id of the folder (required) - * @param \SendinBlue\Client\Model\CreateUpdateFolder $updateFolder Name of the folder (required) + * @param int $folder_id Id of the folder (required) + * @param \SendinBlue\Client\Model\CreateUpdateFolder $update_folder Name of the folder (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function updateFolderRequest($folderId, $updateFolder) + protected function updateFolderRequest($folder_id, $update_folder) { - // verify the required parameter 'folderId' is set - if ($folderId === null || (is_array($folderId) && count($folderId) === 0)) { + // verify the required parameter 'folder_id' is set + if ($folder_id === null || (is_array($folder_id) && count($folder_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $folderId when calling updateFolder' + 'Missing the required parameter $folder_id when calling updateFolder' ); } - // verify the required parameter 'updateFolder' is set - if ($updateFolder === null || (is_array($updateFolder) && count($updateFolder) === 0)) { + // verify the required parameter 'update_folder' is set + if ($update_folder === null || (is_array($update_folder) && count($update_folder) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $updateFolder when calling updateFolder' + 'Missing the required parameter $update_folder when calling updateFolder' ); } @@ -1739,18 +1714,18 @@ protected function updateFolderRequest($folderId, $updateFolder) // path params - if ($folderId !== null) { + if ($folder_id !== null) { $resourcePath = str_replace( '{' . 'folderId' . '}', - ObjectSerializer::toPathValue($folderId), + ObjectSerializer::toPathValue($folder_id), $resourcePath ); } // body params $_tempBody = null; - if (isset($updateFolder)) { - $_tempBody = $updateFolder; + if (isset($update_folder)) { + $_tempBody = $update_folder; } if ($multipart) { @@ -1805,11 +1780,6 @@ protected function updateFolderRequest($folderId, $updateFolder) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { diff --git a/lib/Api/InboundParsingApi.php b/lib/Api/InboundParsingApi.php deleted file mode 100644 index b72a0fbb..00000000 --- a/lib/Api/InboundParsingApi.php +++ /dev/null @@ -1,721 +0,0 @@ -client = $client ?: new Client(); - $this->config = $config ?: new Configuration(); - $this->headerSelector = $selector ?: new HeaderSelector(); - } - - /** - * @return Configuration - */ - public function getConfig() - { - return $this->config; - } - - /** - * Operation getInboundEmailEvents - * - * Get the list of all the events for the received emails. - * - * @param string $sender Email address of the sender. (optional) - * @param \DateTime $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Maximum time period that can be selected is one month. (optional) - * @param \DateTime $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) - * @param int $limit Number of documents returned per page (optional, default to 100) - * @param int $offset Index of the first document on the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \SendinBlue\Client\Model\GetInboundEmailEvents - */ - public function getInboundEmailEvents($sender = null, $startDate = null, $endDate = null, $limit = '100', $offset = '0', $sort = 'desc') - { - list($response) = $this->getInboundEmailEventsWithHttpInfo($sender, $startDate, $endDate, $limit, $offset, $sort); - return $response; - } - - /** - * Operation getInboundEmailEventsWithHttpInfo - * - * Get the list of all the events for the received emails. - * - * @param string $sender Email address of the sender. (optional) - * @param \DateTime $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Maximum time period that can be selected is one month. (optional) - * @param \DateTime $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) - * @param int $limit Number of documents returned per page (optional, default to 100) - * @param int $offset Index of the first document on the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \SendinBlue\Client\Model\GetInboundEmailEvents, HTTP status code, HTTP response headers (array of strings) - */ - public function getInboundEmailEventsWithHttpInfo($sender = null, $startDate = null, $endDate = null, $limit = '100', $offset = '0', $sort = 'desc') - { - $returnType = '\SendinBlue\Client\Model\GetInboundEmailEvents'; - $request = $this->getInboundEmailEventsRequest($sender, $startDate, $endDate, $limit, $offset, $sort); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\GetInboundEmailEvents', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\ErrorModel', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation getInboundEmailEventsAsync - * - * Get the list of all the events for the received emails. - * - * @param string $sender Email address of the sender. (optional) - * @param \DateTime $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Maximum time period that can be selected is one month. (optional) - * @param \DateTime $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) - * @param int $limit Number of documents returned per page (optional, default to 100) - * @param int $offset Index of the first document on the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getInboundEmailEventsAsync($sender = null, $startDate = null, $endDate = null, $limit = '100', $offset = '0', $sort = 'desc') - { - return $this->getInboundEmailEventsAsyncWithHttpInfo($sender, $startDate, $endDate, $limit, $offset, $sort) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation getInboundEmailEventsAsyncWithHttpInfo - * - * Get the list of all the events for the received emails. - * - * @param string $sender Email address of the sender. (optional) - * @param \DateTime $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Maximum time period that can be selected is one month. (optional) - * @param \DateTime $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) - * @param int $limit Number of documents returned per page (optional, default to 100) - * @param int $offset Index of the first document on the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getInboundEmailEventsAsyncWithHttpInfo($sender = null, $startDate = null, $endDate = null, $limit = '100', $offset = '0', $sort = 'desc') - { - $returnType = '\SendinBlue\Client\Model\GetInboundEmailEvents'; - $request = $this->getInboundEmailEventsRequest($sender, $startDate, $endDate, $limit, $offset, $sort); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'getInboundEmailEvents' - * - * @param string $sender Email address of the sender. (optional) - * @param \DateTime $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Maximum time period that can be selected is one month. (optional) - * @param \DateTime $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) - * @param int $limit Number of documents returned per page (optional, default to 100) - * @param int $offset Index of the first document on the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function getInboundEmailEventsRequest($sender = null, $startDate = null, $endDate = null, $limit = '100', $offset = '0', $sort = 'desc') - { - if ($limit !== null && $limit > 500) { - throw new \InvalidArgumentException('invalid value for "$limit" when calling InboundParsingApi.getInboundEmailEvents, must be smaller than or equal to 500.'); - } - - - $resourcePath = '/inbound/events'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($sender !== null) { - $queryParams['sender'] = ObjectSerializer::toQueryValue($sender); - } - // query params - if ($startDate !== null) { - $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); - } - // query params - if ($endDate !== null) { - $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); - } - // query params - if ($limit !== null) { - $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); - } - // query params - if ($offset !== null) { - $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); - } - // query params - if ($sort !== null) { - $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); - } - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - - if($headers['Content-Type'] === 'application/json') { - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass) { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - // array has no __toString(), so we should encode it manually - if(is_array($httpBody)) { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); - } - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('api-key'); - if ($apiKey !== null) { - $headers['api-key'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation getInboundEmailEventsByUuid - * - * Fetch all events history for one particular received email. - * - * @param string $uuid UUID to fetch events specific to recieved email (required) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \SendinBlue\Client\Model\GetInboundEmailEventsByUuid - */ - public function getInboundEmailEventsByUuid($uuid) - { - list($response) = $this->getInboundEmailEventsByUuidWithHttpInfo($uuid); - return $response; - } - - /** - * Operation getInboundEmailEventsByUuidWithHttpInfo - * - * Fetch all events history for one particular received email. - * - * @param string $uuid UUID to fetch events specific to recieved email (required) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \SendinBlue\Client\Model\GetInboundEmailEventsByUuid, HTTP status code, HTTP response headers (array of strings) - */ - public function getInboundEmailEventsByUuidWithHttpInfo($uuid) - { - $returnType = '\SendinBlue\Client\Model\GetInboundEmailEventsByUuid'; - $request = $this->getInboundEmailEventsByUuidRequest($uuid); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\GetInboundEmailEventsByUuid', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\ErrorModel', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation getInboundEmailEventsByUuidAsync - * - * Fetch all events history for one particular received email. - * - * @param string $uuid UUID to fetch events specific to recieved email (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getInboundEmailEventsByUuidAsync($uuid) - { - return $this->getInboundEmailEventsByUuidAsyncWithHttpInfo($uuid) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation getInboundEmailEventsByUuidAsyncWithHttpInfo - * - * Fetch all events history for one particular received email. - * - * @param string $uuid UUID to fetch events specific to recieved email (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getInboundEmailEventsByUuidAsyncWithHttpInfo($uuid) - { - $returnType = '\SendinBlue\Client\Model\GetInboundEmailEventsByUuid'; - $request = $this->getInboundEmailEventsByUuidRequest($uuid); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'getInboundEmailEventsByUuid' - * - * @param string $uuid UUID to fetch events specific to recieved email (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function getInboundEmailEventsByUuidRequest($uuid) - { - // verify the required parameter 'uuid' is set - if ($uuid === null || (is_array($uuid) && count($uuid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $uuid when calling getInboundEmailEventsByUuid' - ); - } - - $resourcePath = '/inbound/events/{uuid}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($uuid !== null) { - $resourcePath = str_replace( - '{' . 'uuid' . '}', - ObjectSerializer::toPathValue($uuid), - $resourcePath - ); - } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - - if($headers['Content-Type'] === 'application/json') { - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass) { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - // array has no __toString(), so we should encode it manually - if(is_array($httpBody)) { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); - } - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('api-key'); - if ($apiKey !== null) { - $headers['api-key'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Create http client option - * - * @throws \RuntimeException on file opening failure - * @return array of http client options - */ - protected function createHttpClientOption() - { - $options = []; - if ($this->config->getDebug()) { - $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); - if (!$options[RequestOptions::DEBUG]) { - throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); - } - } - - return $options; - } -} diff --git a/lib/Api/ListsApi.php b/lib/Api/ListsApi.php index c42e93d1..baeed5f6 100644 --- a/lib/Api/ListsApi.php +++ b/lib/Api/ListsApi.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -92,16 +92,16 @@ public function getConfig() * * Add existing contacts to a list * - * @param int $listId Id of the list (required) - * @param \SendinBlue\Client\Model\AddContactToList $contactEmails Emails addresses OR IDs of the contacts (required) + * @param int $list_id Id of the list (required) + * @param \SendinBlue\Client\Model\AddContactToList $contact_emails Emails addresses of the contacts (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\PostContactInfo */ - public function addContactToList($listId, $contactEmails) + public function addContactToList($list_id, $contact_emails) { - list($response) = $this->addContactToListWithHttpInfo($listId, $contactEmails); + list($response) = $this->addContactToListWithHttpInfo($list_id, $contact_emails); return $response; } @@ -110,17 +110,17 @@ public function addContactToList($listId, $contactEmails) * * Add existing contacts to a list * - * @param int $listId Id of the list (required) - * @param \SendinBlue\Client\Model\AddContactToList $contactEmails Emails addresses OR IDs of the contacts (required) + * @param int $list_id Id of the list (required) + * @param \SendinBlue\Client\Model\AddContactToList $contact_emails Emails addresses of the contacts (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\PostContactInfo, HTTP status code, HTTP response headers (array of strings) */ - public function addContactToListWithHttpInfo($listId, $contactEmails) + public function addContactToListWithHttpInfo($list_id, $contact_emails) { $returnType = '\SendinBlue\Client\Model\PostContactInfo'; - $request = $this->addContactToListRequest($listId, $contactEmails); + $request = $this->addContactToListRequest($list_id, $contact_emails); try { $options = $this->createHttpClientOption(); @@ -202,15 +202,15 @@ public function addContactToListWithHttpInfo($listId, $contactEmails) * * Add existing contacts to a list * - * @param int $listId Id of the list (required) - * @param \SendinBlue\Client\Model\AddContactToList $contactEmails Emails addresses OR IDs of the contacts (required) + * @param int $list_id Id of the list (required) + * @param \SendinBlue\Client\Model\AddContactToList $contact_emails Emails addresses of the contacts (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addContactToListAsync($listId, $contactEmails) + public function addContactToListAsync($list_id, $contact_emails) { - return $this->addContactToListAsyncWithHttpInfo($listId, $contactEmails) + return $this->addContactToListAsyncWithHttpInfo($list_id, $contact_emails) ->then( function ($response) { return $response[0]; @@ -223,16 +223,16 @@ function ($response) { * * Add existing contacts to a list * - * @param int $listId Id of the list (required) - * @param \SendinBlue\Client\Model\AddContactToList $contactEmails Emails addresses OR IDs of the contacts (required) + * @param int $list_id Id of the list (required) + * @param \SendinBlue\Client\Model\AddContactToList $contact_emails Emails addresses of the contacts (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addContactToListAsyncWithHttpInfo($listId, $contactEmails) + public function addContactToListAsyncWithHttpInfo($list_id, $contact_emails) { $returnType = '\SendinBlue\Client\Model\PostContactInfo'; - $request = $this->addContactToListRequest($listId, $contactEmails); + $request = $this->addContactToListRequest($list_id, $contact_emails); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -274,24 +274,24 @@ function ($exception) { /** * Create request for operation 'addContactToList' * - * @param int $listId Id of the list (required) - * @param \SendinBlue\Client\Model\AddContactToList $contactEmails Emails addresses OR IDs of the contacts (required) + * @param int $list_id Id of the list (required) + * @param \SendinBlue\Client\Model\AddContactToList $contact_emails Emails addresses of the contacts (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function addContactToListRequest($listId, $contactEmails) + protected function addContactToListRequest($list_id, $contact_emails) { - // verify the required parameter 'listId' is set - if ($listId === null || (is_array($listId) && count($listId) === 0)) { + // verify the required parameter 'list_id' is set + if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $listId when calling addContactToList' + 'Missing the required parameter $list_id when calling addContactToList' ); } - // verify the required parameter 'contactEmails' is set - if ($contactEmails === null || (is_array($contactEmails) && count($contactEmails) === 0)) { + // verify the required parameter 'contact_emails' is set + if ($contact_emails === null || (is_array($contact_emails) && count($contact_emails) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $contactEmails when calling addContactToList' + 'Missing the required parameter $contact_emails when calling addContactToList' ); } @@ -304,18 +304,18 @@ protected function addContactToListRequest($listId, $contactEmails) // path params - if ($listId !== null) { + if ($list_id !== null) { $resourcePath = str_replace( '{' . 'listId' . '}', - ObjectSerializer::toPathValue($listId), + ObjectSerializer::toPathValue($list_id), $resourcePath ); } // body params $_tempBody = null; - if (isset($contactEmails)) { - $_tempBody = $contactEmails; + if (isset($contact_emails)) { + $_tempBody = $contact_emails; } if ($multipart) { @@ -370,11 +370,6 @@ protected function addContactToListRequest($listId, $contactEmails) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -401,15 +396,15 @@ protected function addContactToListRequest($listId, $contactEmails) * * Create a list * - * @param \SendinBlue\Client\Model\CreateList $createList Values to create a list (required) + * @param \SendinBlue\Client\Model\CreateList $create_list Values to create a list (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\CreateModel */ - public function createList($createList) + public function createList($create_list) { - list($response) = $this->createListWithHttpInfo($createList); + list($response) = $this->createListWithHttpInfo($create_list); return $response; } @@ -418,16 +413,16 @@ public function createList($createList) * * Create a list * - * @param \SendinBlue\Client\Model\CreateList $createList Values to create a list (required) + * @param \SendinBlue\Client\Model\CreateList $create_list Values to create a list (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\CreateModel, HTTP status code, HTTP response headers (array of strings) */ - public function createListWithHttpInfo($createList) + public function createListWithHttpInfo($create_list) { $returnType = '\SendinBlue\Client\Model\CreateModel'; - $request = $this->createListRequest($createList); + $request = $this->createListRequest($create_list); try { $options = $this->createHttpClientOption(); @@ -501,14 +496,14 @@ public function createListWithHttpInfo($createList) * * Create a list * - * @param \SendinBlue\Client\Model\CreateList $createList Values to create a list (required) + * @param \SendinBlue\Client\Model\CreateList $create_list Values to create a list (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createListAsync($createList) + public function createListAsync($create_list) { - return $this->createListAsyncWithHttpInfo($createList) + return $this->createListAsyncWithHttpInfo($create_list) ->then( function ($response) { return $response[0]; @@ -521,15 +516,15 @@ function ($response) { * * Create a list * - * @param \SendinBlue\Client\Model\CreateList $createList Values to create a list (required) + * @param \SendinBlue\Client\Model\CreateList $create_list Values to create a list (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createListAsyncWithHttpInfo($createList) + public function createListAsyncWithHttpInfo($create_list) { $returnType = '\SendinBlue\Client\Model\CreateModel'; - $request = $this->createListRequest($createList); + $request = $this->createListRequest($create_list); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -571,17 +566,17 @@ function ($exception) { /** * Create request for operation 'createList' * - * @param \SendinBlue\Client\Model\CreateList $createList Values to create a list (required) + * @param \SendinBlue\Client\Model\CreateList $create_list Values to create a list (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function createListRequest($createList) + protected function createListRequest($create_list) { - // verify the required parameter 'createList' is set - if ($createList === null || (is_array($createList) && count($createList) === 0)) { + // verify the required parameter 'create_list' is set + if ($create_list === null || (is_array($create_list) && count($create_list) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $createList when calling createList' + 'Missing the required parameter $create_list when calling createList' ); } @@ -596,8 +591,8 @@ protected function createListRequest($createList) // body params $_tempBody = null; - if (isset($createList)) { - $_tempBody = $createList; + if (isset($create_list)) { + $_tempBody = $create_list; } if ($multipart) { @@ -652,11 +647,6 @@ protected function createListRequest($createList) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -683,15 +673,15 @@ protected function createListRequest($createList) * * Delete a list * - * @param int $listId Id of the list (required) + * @param int $list_id Id of the list (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function deleteList($listId) + public function deleteList($list_id) { - $this->deleteListWithHttpInfo($listId); + $this->deleteListWithHttpInfo($list_id); } /** @@ -699,16 +689,16 @@ public function deleteList($listId) * * Delete a list * - * @param int $listId Id of the list (required) + * @param int $list_id Id of the list (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteListWithHttpInfo($listId) + public function deleteListWithHttpInfo($list_id) { $returnType = ''; - $request = $this->deleteListRequest($listId); + $request = $this->deleteListRequest($list_id); try { $options = $this->createHttpClientOption(); @@ -742,7 +732,7 @@ public function deleteListWithHttpInfo($listId) } catch (ApiException $e) { switch ($e->getCode()) { - case 400: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -750,7 +740,7 @@ public function deleteListWithHttpInfo($listId) ); $e->setResponseObject($data); break; - case 404: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -768,14 +758,14 @@ public function deleteListWithHttpInfo($listId) * * Delete a list * - * @param int $listId Id of the list (required) + * @param int $list_id Id of the list (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteListAsync($listId) + public function deleteListAsync($list_id) { - return $this->deleteListAsyncWithHttpInfo($listId) + return $this->deleteListAsyncWithHttpInfo($list_id) ->then( function ($response) { return $response[0]; @@ -788,15 +778,15 @@ function ($response) { * * Delete a list * - * @param int $listId Id of the list (required) + * @param int $list_id Id of the list (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteListAsyncWithHttpInfo($listId) + public function deleteListAsyncWithHttpInfo($list_id) { $returnType = ''; - $request = $this->deleteListRequest($listId); + $request = $this->deleteListRequest($list_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -824,17 +814,17 @@ function ($exception) { /** * Create request for operation 'deleteList' * - * @param int $listId Id of the list (required) + * @param int $list_id Id of the list (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function deleteListRequest($listId) + protected function deleteListRequest($list_id) { - // verify the required parameter 'listId' is set - if ($listId === null || (is_array($listId) && count($listId) === 0)) { + // verify the required parameter 'list_id' is set + if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $listId when calling deleteList' + 'Missing the required parameter $list_id when calling deleteList' ); } @@ -847,10 +837,10 @@ protected function deleteListRequest($listId) // path params - if ($listId !== null) { + if ($list_id !== null) { $resourcePath = str_replace( '{' . 'listId' . '}', - ObjectSerializer::toPathValue($listId), + ObjectSerializer::toPathValue($list_id), $resourcePath ); } @@ -910,11 +900,6 @@ protected function deleteListRequest($listId) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -941,19 +926,19 @@ protected function deleteListRequest($listId) * * Get contacts in a list * - * @param int $listId Id of the list (required) - * @param string $modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param int $list_id Id of the list (required) + * @param \DateTime $modified_since Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) * @param int $limit Number of documents per page (optional, default to 50) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\GetContacts */ - public function getContactsFromList($listId, $modifiedSince = null, $limit = '50', $offset = '0', $sort = 'desc') + public function getContactsFromList($list_id, $modified_since = null, $limit = '50', $offset = '0', $sort = 'desc') { - list($response) = $this->getContactsFromListWithHttpInfo($listId, $modifiedSince, $limit, $offset, $sort); + list($response) = $this->getContactsFromListWithHttpInfo($list_id, $modified_since, $limit, $offset, $sort); return $response; } @@ -962,20 +947,20 @@ public function getContactsFromList($listId, $modifiedSince = null, $limit = '50 * * Get contacts in a list * - * @param int $listId Id of the list (required) - * @param string $modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param int $list_id Id of the list (required) + * @param \DateTime $modified_since Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) * @param int $limit Number of documents per page (optional, default to 50) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\GetContacts, HTTP status code, HTTP response headers (array of strings) */ - public function getContactsFromListWithHttpInfo($listId, $modifiedSince = null, $limit = '50', $offset = '0', $sort = 'desc') + public function getContactsFromListWithHttpInfo($list_id, $modified_since = null, $limit = '50', $offset = '0', $sort = 'desc') { $returnType = '\SendinBlue\Client\Model\GetContacts'; - $request = $this->getContactsFromListRequest($listId, $modifiedSince, $limit, $offset, $sort); + $request = $this->getContactsFromListRequest($list_id, $modified_since, $limit, $offset, $sort); try { $options = $this->createHttpClientOption(); @@ -1057,18 +1042,18 @@ public function getContactsFromListWithHttpInfo($listId, $modifiedSince = null, * * Get contacts in a list * - * @param int $listId Id of the list (required) - * @param string $modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param int $list_id Id of the list (required) + * @param \DateTime $modified_since Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) * @param int $limit Number of documents per page (optional, default to 50) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getContactsFromListAsync($listId, $modifiedSince = null, $limit = '50', $offset = '0', $sort = 'desc') + public function getContactsFromListAsync($list_id, $modified_since = null, $limit = '50', $offset = '0', $sort = 'desc') { - return $this->getContactsFromListAsyncWithHttpInfo($listId, $modifiedSince, $limit, $offset, $sort) + return $this->getContactsFromListAsyncWithHttpInfo($list_id, $modified_since, $limit, $offset, $sort) ->then( function ($response) { return $response[0]; @@ -1081,19 +1066,19 @@ function ($response) { * * Get contacts in a list * - * @param int $listId Id of the list (required) - * @param string $modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param int $list_id Id of the list (required) + * @param \DateTime $modified_since Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) * @param int $limit Number of documents per page (optional, default to 50) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getContactsFromListAsyncWithHttpInfo($listId, $modifiedSince = null, $limit = '50', $offset = '0', $sort = 'desc') + public function getContactsFromListAsyncWithHttpInfo($list_id, $modified_since = null, $limit = '50', $offset = '0', $sort = 'desc') { $returnType = '\SendinBlue\Client\Model\GetContacts'; - $request = $this->getContactsFromListRequest($listId, $modifiedSince, $limit, $offset, $sort); + $request = $this->getContactsFromListRequest($list_id, $modified_since, $limit, $offset, $sort); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1135,21 +1120,21 @@ function ($exception) { /** * Create request for operation 'getContactsFromList' * - * @param int $listId Id of the list (required) - * @param string $modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param int $list_id Id of the list (required) + * @param \DateTime $modified_since Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) * @param int $limit Number of documents per page (optional, default to 50) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getContactsFromListRequest($listId, $modifiedSince = null, $limit = '50', $offset = '0', $sort = 'desc') + protected function getContactsFromListRequest($list_id, $modified_since = null, $limit = '50', $offset = '0', $sort = 'desc') { - // verify the required parameter 'listId' is set - if ($listId === null || (is_array($listId) && count($listId) === 0)) { + // verify the required parameter 'list_id' is set + if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $listId when calling getContactsFromList' + 'Missing the required parameter $list_id when calling getContactsFromList' ); } if ($limit !== null && $limit > 500) { @@ -1165,8 +1150,8 @@ protected function getContactsFromListRequest($listId, $modifiedSince = null, $l $multipart = false; // query params - if ($modifiedSince !== null) { - $queryParams['modifiedSince'] = ObjectSerializer::toQueryValue($modifiedSince); + if ($modified_since !== null) { + $queryParams['modifiedSince'] = ObjectSerializer::toQueryValue($modified_since); } // query params if ($limit !== null) { @@ -1182,10 +1167,10 @@ protected function getContactsFromListRequest($listId, $modifiedSince = null, $l } // path params - if ($listId !== null) { + if ($list_id !== null) { $resourcePath = str_replace( '{' . 'listId' . '}', - ObjectSerializer::toPathValue($listId), + ObjectSerializer::toPathValue($list_id), $resourcePath ); } @@ -1245,11 +1230,6 @@ protected function getContactsFromListRequest($listId, $modifiedSince = null, $l if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1276,18 +1256,18 @@ protected function getContactsFromListRequest($listId, $modifiedSince = null, $l * * Get lists in a folder * - * @param int $folderId Id of the folder (required) + * @param int $folder_id Id of the folder (required) * @param int $limit Number of documents per page (optional, default to 10) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\GetFolderLists */ - public function getFolderLists($folderId, $limit = '10', $offset = '0', $sort = 'desc') + public function getFolderLists($folder_id, $limit = '10', $offset = '0', $sort = 'desc') { - list($response) = $this->getFolderListsWithHttpInfo($folderId, $limit, $offset, $sort); + list($response) = $this->getFolderListsWithHttpInfo($folder_id, $limit, $offset, $sort); return $response; } @@ -1296,19 +1276,19 @@ public function getFolderLists($folderId, $limit = '10', $offset = '0', $sort = * * Get lists in a folder * - * @param int $folderId Id of the folder (required) + * @param int $folder_id Id of the folder (required) * @param int $limit Number of documents per page (optional, default to 10) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\GetFolderLists, HTTP status code, HTTP response headers (array of strings) */ - public function getFolderListsWithHttpInfo($folderId, $limit = '10', $offset = '0', $sort = 'desc') + public function getFolderListsWithHttpInfo($folder_id, $limit = '10', $offset = '0', $sort = 'desc') { $returnType = '\SendinBlue\Client\Model\GetFolderLists'; - $request = $this->getFolderListsRequest($folderId, $limit, $offset, $sort); + $request = $this->getFolderListsRequest($folder_id, $limit, $offset, $sort); try { $options = $this->createHttpClientOption(); @@ -1364,7 +1344,7 @@ public function getFolderListsWithHttpInfo($folderId, $limit = '10', $offset = ' ); $e->setResponseObject($data); break; - case 400: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -1372,7 +1352,7 @@ public function getFolderListsWithHttpInfo($folderId, $limit = '10', $offset = ' ); $e->setResponseObject($data); break; - case 404: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -1390,17 +1370,17 @@ public function getFolderListsWithHttpInfo($folderId, $limit = '10', $offset = ' * * Get lists in a folder * - * @param int $folderId Id of the folder (required) + * @param int $folder_id Id of the folder (required) * @param int $limit Number of documents per page (optional, default to 10) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getFolderListsAsync($folderId, $limit = '10', $offset = '0', $sort = 'desc') + public function getFolderListsAsync($folder_id, $limit = '10', $offset = '0', $sort = 'desc') { - return $this->getFolderListsAsyncWithHttpInfo($folderId, $limit, $offset, $sort) + return $this->getFolderListsAsyncWithHttpInfo($folder_id, $limit, $offset, $sort) ->then( function ($response) { return $response[0]; @@ -1413,18 +1393,18 @@ function ($response) { * * Get lists in a folder * - * @param int $folderId Id of the folder (required) + * @param int $folder_id Id of the folder (required) * @param int $limit Number of documents per page (optional, default to 10) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getFolderListsAsyncWithHttpInfo($folderId, $limit = '10', $offset = '0', $sort = 'desc') + public function getFolderListsAsyncWithHttpInfo($folder_id, $limit = '10', $offset = '0', $sort = 'desc') { $returnType = '\SendinBlue\Client\Model\GetFolderLists'; - $request = $this->getFolderListsRequest($folderId, $limit, $offset, $sort); + $request = $this->getFolderListsRequest($folder_id, $limit, $offset, $sort); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1466,20 +1446,20 @@ function ($exception) { /** * Create request for operation 'getFolderLists' * - * @param int $folderId Id of the folder (required) + * @param int $folder_id Id of the folder (required) * @param int $limit Number of documents per page (optional, default to 10) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getFolderListsRequest($folderId, $limit = '10', $offset = '0', $sort = 'desc') + protected function getFolderListsRequest($folder_id, $limit = '10', $offset = '0', $sort = 'desc') { - // verify the required parameter 'folderId' is set - if ($folderId === null || (is_array($folderId) && count($folderId) === 0)) { + // verify the required parameter 'folder_id' is set + if ($folder_id === null || (is_array($folder_id) && count($folder_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $folderId when calling getFolderLists' + 'Missing the required parameter $folder_id when calling getFolderLists' ); } if ($limit !== null && $limit > 50) { @@ -1508,10 +1488,10 @@ protected function getFolderListsRequest($folderId, $limit = '10', $offset = '0' } // path params - if ($folderId !== null) { + if ($folder_id !== null) { $resourcePath = str_replace( '{' . 'folderId' . '}', - ObjectSerializer::toPathValue($folderId), + ObjectSerializer::toPathValue($folder_id), $resourcePath ); } @@ -1571,11 +1551,6 @@ protected function getFolderListsRequest($folderId, $limit = '10', $offset = '0' if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1602,15 +1577,15 @@ protected function getFolderListsRequest($folderId, $limit = '10', $offset = '0' * * Get a list's details * - * @param int $listId Id of the list (required) + * @param int $list_id Id of the list (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\GetExtendedList */ - public function getList($listId) + public function getList($list_id) { - list($response) = $this->getListWithHttpInfo($listId); + list($response) = $this->getListWithHttpInfo($list_id); return $response; } @@ -1619,16 +1594,16 @@ public function getList($listId) * * Get a list's details * - * @param int $listId Id of the list (required) + * @param int $list_id Id of the list (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\GetExtendedList, HTTP status code, HTTP response headers (array of strings) */ - public function getListWithHttpInfo($listId) + public function getListWithHttpInfo($list_id) { $returnType = '\SendinBlue\Client\Model\GetExtendedList'; - $request = $this->getListRequest($listId); + $request = $this->getListRequest($list_id); try { $options = $this->createHttpClientOption(); @@ -1684,7 +1659,7 @@ public function getListWithHttpInfo($listId) ); $e->setResponseObject($data); break; - case 400: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -1692,7 +1667,7 @@ public function getListWithHttpInfo($listId) ); $e->setResponseObject($data); break; - case 404: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -1710,14 +1685,14 @@ public function getListWithHttpInfo($listId) * * Get a list's details * - * @param int $listId Id of the list (required) + * @param int $list_id Id of the list (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getListAsync($listId) + public function getListAsync($list_id) { - return $this->getListAsyncWithHttpInfo($listId) + return $this->getListAsyncWithHttpInfo($list_id) ->then( function ($response) { return $response[0]; @@ -1730,15 +1705,15 @@ function ($response) { * * Get a list's details * - * @param int $listId Id of the list (required) + * @param int $list_id Id of the list (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getListAsyncWithHttpInfo($listId) + public function getListAsyncWithHttpInfo($list_id) { $returnType = '\SendinBlue\Client\Model\GetExtendedList'; - $request = $this->getListRequest($listId); + $request = $this->getListRequest($list_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1780,17 +1755,17 @@ function ($exception) { /** * Create request for operation 'getList' * - * @param int $listId Id of the list (required) + * @param int $list_id Id of the list (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getListRequest($listId) + protected function getListRequest($list_id) { - // verify the required parameter 'listId' is set - if ($listId === null || (is_array($listId) && count($listId) === 0)) { + // verify the required parameter 'list_id' is set + if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $listId when calling getList' + 'Missing the required parameter $list_id when calling getList' ); } @@ -1803,10 +1778,10 @@ protected function getListRequest($listId) // path params - if ($listId !== null) { + if ($list_id !== null) { $resourcePath = str_replace( '{' . 'listId' . '}', - ObjectSerializer::toPathValue($listId), + ObjectSerializer::toPathValue($list_id), $resourcePath ); } @@ -1866,11 +1841,6 @@ protected function getListRequest($listId) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1899,7 +1869,7 @@ protected function getListRequest($listId) * * @param int $limit Number of documents per page (optional, default to 10) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1918,7 +1888,7 @@ public function getLists($limit = '10', $offset = '0', $sort = 'desc') * * @param int $limit Number of documents per page (optional, default to 10) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -2003,7 +1973,7 @@ public function getListsWithHttpInfo($limit = '10', $offset = '0', $sort = 'desc * * @param int $limit Number of documents per page (optional, default to 10) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -2025,7 +1995,7 @@ function ($response) { * * @param int $limit Number of documents per page (optional, default to 10) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -2077,7 +2047,7 @@ function ($exception) { * * @param int $limit Number of documents per page (optional, default to 10) * @param int $offset Index of the first document of the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -2165,11 +2135,6 @@ protected function getListsRequest($limit = '10', $offset = '0', $sort = 'desc') if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -2196,16 +2161,16 @@ protected function getListsRequest($limit = '10', $offset = '0', $sort = 'desc') * * Delete a contact from a list * - * @param int $listId Id of the list (required) - * @param \SendinBlue\Client\Model\RemoveContactFromList $contactEmails Emails addresses OR IDs of the contacts (required) + * @param int $list_id Id of the list (required) + * @param \SendinBlue\Client\Model\RemoveContactFromList $contact_emails Emails adresses of the contact (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\PostContactInfo */ - public function removeContactFromList($listId, $contactEmails) + public function removeContactFromList($list_id, $contact_emails) { - list($response) = $this->removeContactFromListWithHttpInfo($listId, $contactEmails); + list($response) = $this->removeContactFromListWithHttpInfo($list_id, $contact_emails); return $response; } @@ -2214,17 +2179,17 @@ public function removeContactFromList($listId, $contactEmails) * * Delete a contact from a list * - * @param int $listId Id of the list (required) - * @param \SendinBlue\Client\Model\RemoveContactFromList $contactEmails Emails addresses OR IDs of the contacts (required) + * @param int $list_id Id of the list (required) + * @param \SendinBlue\Client\Model\RemoveContactFromList $contact_emails Emails adresses of the contact (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\PostContactInfo, HTTP status code, HTTP response headers (array of strings) */ - public function removeContactFromListWithHttpInfo($listId, $contactEmails) + public function removeContactFromListWithHttpInfo($list_id, $contact_emails) { $returnType = '\SendinBlue\Client\Model\PostContactInfo'; - $request = $this->removeContactFromListRequest($listId, $contactEmails); + $request = $this->removeContactFromListRequest($list_id, $contact_emails); try { $options = $this->createHttpClientOption(); @@ -2306,15 +2271,15 @@ public function removeContactFromListWithHttpInfo($listId, $contactEmails) * * Delete a contact from a list * - * @param int $listId Id of the list (required) - * @param \SendinBlue\Client\Model\RemoveContactFromList $contactEmails Emails addresses OR IDs of the contacts (required) + * @param int $list_id Id of the list (required) + * @param \SendinBlue\Client\Model\RemoveContactFromList $contact_emails Emails adresses of the contact (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function removeContactFromListAsync($listId, $contactEmails) + public function removeContactFromListAsync($list_id, $contact_emails) { - return $this->removeContactFromListAsyncWithHttpInfo($listId, $contactEmails) + return $this->removeContactFromListAsyncWithHttpInfo($list_id, $contact_emails) ->then( function ($response) { return $response[0]; @@ -2327,16 +2292,16 @@ function ($response) { * * Delete a contact from a list * - * @param int $listId Id of the list (required) - * @param \SendinBlue\Client\Model\RemoveContactFromList $contactEmails Emails addresses OR IDs of the contacts (required) + * @param int $list_id Id of the list (required) + * @param \SendinBlue\Client\Model\RemoveContactFromList $contact_emails Emails adresses of the contact (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function removeContactFromListAsyncWithHttpInfo($listId, $contactEmails) + public function removeContactFromListAsyncWithHttpInfo($list_id, $contact_emails) { $returnType = '\SendinBlue\Client\Model\PostContactInfo'; - $request = $this->removeContactFromListRequest($listId, $contactEmails); + $request = $this->removeContactFromListRequest($list_id, $contact_emails); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2378,24 +2343,24 @@ function ($exception) { /** * Create request for operation 'removeContactFromList' * - * @param int $listId Id of the list (required) - * @param \SendinBlue\Client\Model\RemoveContactFromList $contactEmails Emails addresses OR IDs of the contacts (required) + * @param int $list_id Id of the list (required) + * @param \SendinBlue\Client\Model\RemoveContactFromList $contact_emails Emails adresses of the contact (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function removeContactFromListRequest($listId, $contactEmails) + protected function removeContactFromListRequest($list_id, $contact_emails) { - // verify the required parameter 'listId' is set - if ($listId === null || (is_array($listId) && count($listId) === 0)) { + // verify the required parameter 'list_id' is set + if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $listId when calling removeContactFromList' + 'Missing the required parameter $list_id when calling removeContactFromList' ); } - // verify the required parameter 'contactEmails' is set - if ($contactEmails === null || (is_array($contactEmails) && count($contactEmails) === 0)) { + // verify the required parameter 'contact_emails' is set + if ($contact_emails === null || (is_array($contact_emails) && count($contact_emails) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $contactEmails when calling removeContactFromList' + 'Missing the required parameter $contact_emails when calling removeContactFromList' ); } @@ -2408,18 +2373,18 @@ protected function removeContactFromListRequest($listId, $contactEmails) // path params - if ($listId !== null) { + if ($list_id !== null) { $resourcePath = str_replace( '{' . 'listId' . '}', - ObjectSerializer::toPathValue($listId), + ObjectSerializer::toPathValue($list_id), $resourcePath ); } // body params $_tempBody = null; - if (isset($contactEmails)) { - $_tempBody = $contactEmails; + if (isset($contact_emails)) { + $_tempBody = $contact_emails; } if ($multipart) { @@ -2474,11 +2439,6 @@ protected function removeContactFromListRequest($listId, $contactEmails) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -2505,16 +2465,16 @@ protected function removeContactFromListRequest($listId, $contactEmails) * * Update a list * - * @param int $listId Id of the list (required) - * @param \SendinBlue\Client\Model\UpdateList $updateList Values to update a list (required) + * @param int $list_id Id of the list (required) + * @param \SendinBlue\Client\Model\UpdateList $update_list Values to update a list (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function updateList($listId, $updateList) + public function updateList($list_id, $update_list) { - $this->updateListWithHttpInfo($listId, $updateList); + $this->updateListWithHttpInfo($list_id, $update_list); } /** @@ -2522,17 +2482,17 @@ public function updateList($listId, $updateList) * * Update a list * - * @param int $listId Id of the list (required) - * @param \SendinBlue\Client\Model\UpdateList $updateList Values to update a list (required) + * @param int $list_id Id of the list (required) + * @param \SendinBlue\Client\Model\UpdateList $update_list Values to update a list (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function updateListWithHttpInfo($listId, $updateList) + public function updateListWithHttpInfo($list_id, $update_list) { $returnType = ''; - $request = $this->updateListRequest($listId, $updateList); + $request = $this->updateListRequest($list_id, $update_list); try { $options = $this->createHttpClientOption(); @@ -2592,15 +2552,15 @@ public function updateListWithHttpInfo($listId, $updateList) * * Update a list * - * @param int $listId Id of the list (required) - * @param \SendinBlue\Client\Model\UpdateList $updateList Values to update a list (required) + * @param int $list_id Id of the list (required) + * @param \SendinBlue\Client\Model\UpdateList $update_list Values to update a list (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateListAsync($listId, $updateList) + public function updateListAsync($list_id, $update_list) { - return $this->updateListAsyncWithHttpInfo($listId, $updateList) + return $this->updateListAsyncWithHttpInfo($list_id, $update_list) ->then( function ($response) { return $response[0]; @@ -2613,16 +2573,16 @@ function ($response) { * * Update a list * - * @param int $listId Id of the list (required) - * @param \SendinBlue\Client\Model\UpdateList $updateList Values to update a list (required) + * @param int $list_id Id of the list (required) + * @param \SendinBlue\Client\Model\UpdateList $update_list Values to update a list (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateListAsyncWithHttpInfo($listId, $updateList) + public function updateListAsyncWithHttpInfo($list_id, $update_list) { $returnType = ''; - $request = $this->updateListRequest($listId, $updateList); + $request = $this->updateListRequest($list_id, $update_list); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2650,24 +2610,24 @@ function ($exception) { /** * Create request for operation 'updateList' * - * @param int $listId Id of the list (required) - * @param \SendinBlue\Client\Model\UpdateList $updateList Values to update a list (required) + * @param int $list_id Id of the list (required) + * @param \SendinBlue\Client\Model\UpdateList $update_list Values to update a list (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function updateListRequest($listId, $updateList) + protected function updateListRequest($list_id, $update_list) { - // verify the required parameter 'listId' is set - if ($listId === null || (is_array($listId) && count($listId) === 0)) { + // verify the required parameter 'list_id' is set + if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $listId when calling updateList' + 'Missing the required parameter $list_id when calling updateList' ); } - // verify the required parameter 'updateList' is set - if ($updateList === null || (is_array($updateList) && count($updateList) === 0)) { + // verify the required parameter 'update_list' is set + if ($update_list === null || (is_array($update_list) && count($update_list) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $updateList when calling updateList' + 'Missing the required parameter $update_list when calling updateList' ); } @@ -2680,18 +2640,18 @@ protected function updateListRequest($listId, $updateList) // path params - if ($listId !== null) { + if ($list_id !== null) { $resourcePath = str_replace( '{' . 'listId' . '}', - ObjectSerializer::toPathValue($listId), + ObjectSerializer::toPathValue($list_id), $resourcePath ); } // body params $_tempBody = null; - if (isset($updateList)) { - $_tempBody = $updateList; + if (isset($update_list)) { + $_tempBody = $update_list; } if ($multipart) { @@ -2746,11 +2706,6 @@ protected function updateListRequest($listId, $updateList) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { diff --git a/lib/Api/MasterAccountApi.php b/lib/Api/MasterAccountApi.php deleted file mode 100644 index 1b4ea0de..00000000 --- a/lib/Api/MasterAccountApi.php +++ /dev/null @@ -1,2039 +0,0 @@ -client = $client ?: new Client(); - $this->config = $config ?: new Configuration(); - $this->headerSelector = $selector ?: new HeaderSelector(); - } - - /** - * @return Configuration - */ - public function getConfig() - { - return $this->config; - } - - /** - * Operation corporateMasterAccountGet - * - * Get the details of requested master account - * - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \SendinBlue\Client\Model\MasterDetailsResponse - */ - public function corporateMasterAccountGet() - { - list($response) = $this->corporateMasterAccountGetWithHttpInfo(); - return $response; - } - - /** - * Operation corporateMasterAccountGetWithHttpInfo - * - * Get the details of requested master account - * - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \SendinBlue\Client\Model\MasterDetailsResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function corporateMasterAccountGetWithHttpInfo() - { - $returnType = '\SendinBlue\Client\Model\MasterDetailsResponse'; - $request = $this->corporateMasterAccountGetRequest(); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\MasterDetailsResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\ErrorModel', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation corporateMasterAccountGetAsync - * - * Get the details of requested master account - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function corporateMasterAccountGetAsync() - { - return $this->corporateMasterAccountGetAsyncWithHttpInfo() - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation corporateMasterAccountGetAsyncWithHttpInfo - * - * Get the details of requested master account - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function corporateMasterAccountGetAsyncWithHttpInfo() - { - $returnType = '\SendinBlue\Client\Model\MasterDetailsResponse'; - $request = $this->corporateMasterAccountGetRequest(); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'corporateMasterAccountGet' - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function corporateMasterAccountGetRequest() - { - - $resourcePath = '/corporate/masterAccount'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - - if($headers['Content-Type'] === 'application/json') { - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass) { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - // array has no __toString(), so we should encode it manually - if(is_array($httpBody)) { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); - } - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('api-key'); - if ($apiKey !== null) { - $headers['api-key'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation corporateSubAccountGet - * - * Get the list of all the sub-accounts of the master account. - * - * @param int $offset Index of the first sub-account in the page (required) - * @param int $limit Number of sub-accounts to be displayed on each page (required) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \SendinBlue\Client\Model\SubAccountsResponse - */ - public function corporateSubAccountGet($offset, $limit) - { - list($response) = $this->corporateSubAccountGetWithHttpInfo($offset, $limit); - return $response; - } - - /** - * Operation corporateSubAccountGetWithHttpInfo - * - * Get the list of all the sub-accounts of the master account. - * - * @param int $offset Index of the first sub-account in the page (required) - * @param int $limit Number of sub-accounts to be displayed on each page (required) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \SendinBlue\Client\Model\SubAccountsResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function corporateSubAccountGetWithHttpInfo($offset, $limit) - { - $returnType = '\SendinBlue\Client\Model\SubAccountsResponse'; - $request = $this->corporateSubAccountGetRequest($offset, $limit); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\SubAccountsResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\ErrorModel', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation corporateSubAccountGetAsync - * - * Get the list of all the sub-accounts of the master account. - * - * @param int $offset Index of the first sub-account in the page (required) - * @param int $limit Number of sub-accounts to be displayed on each page (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function corporateSubAccountGetAsync($offset, $limit) - { - return $this->corporateSubAccountGetAsyncWithHttpInfo($offset, $limit) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation corporateSubAccountGetAsyncWithHttpInfo - * - * Get the list of all the sub-accounts of the master account. - * - * @param int $offset Index of the first sub-account in the page (required) - * @param int $limit Number of sub-accounts to be displayed on each page (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function corporateSubAccountGetAsyncWithHttpInfo($offset, $limit) - { - $returnType = '\SendinBlue\Client\Model\SubAccountsResponse'; - $request = $this->corporateSubAccountGetRequest($offset, $limit); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'corporateSubAccountGet' - * - * @param int $offset Index of the first sub-account in the page (required) - * @param int $limit Number of sub-accounts to be displayed on each page (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function corporateSubAccountGetRequest($offset, $limit) - { - // verify the required parameter 'offset' is set - if ($offset === null || (is_array($offset) && count($offset) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $offset when calling corporateSubAccountGet' - ); - } - // verify the required parameter 'limit' is set - if ($limit === null || (is_array($limit) && count($limit) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $limit when calling corporateSubAccountGet' - ); - } - - $resourcePath = '/corporate/subAccount'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($offset !== null) { - $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); - } - // query params - if ($limit !== null) { - $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); - } - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - - if($headers['Content-Type'] === 'application/json') { - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass) { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - // array has no __toString(), so we should encode it manually - if(is_array($httpBody)) { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); - } - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('api-key'); - if ($apiKey !== null) { - $headers['api-key'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation corporateSubAccountIdDelete - * - * Delete a sub-account - * - * @param int $id Id of the sub-account organization to be deleted (required) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - */ - public function corporateSubAccountIdDelete($id) - { - $this->corporateSubAccountIdDeleteWithHttpInfo($id); - } - - /** - * Operation corporateSubAccountIdDeleteWithHttpInfo - * - * Delete a sub-account - * - * @param int $id Id of the sub-account organization to be deleted (required) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function corporateSubAccountIdDeleteWithHttpInfo($id) - { - $returnType = ''; - $request = $this->corporateSubAccountIdDeleteRequest($id); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - } - throw $e; - } - } - - /** - * Operation corporateSubAccountIdDeleteAsync - * - * Delete a sub-account - * - * @param int $id Id of the sub-account organization to be deleted (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function corporateSubAccountIdDeleteAsync($id) - { - return $this->corporateSubAccountIdDeleteAsyncWithHttpInfo($id) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation corporateSubAccountIdDeleteAsyncWithHttpInfo - * - * Delete a sub-account - * - * @param int $id Id of the sub-account organization to be deleted (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function corporateSubAccountIdDeleteAsyncWithHttpInfo($id) - { - $returnType = ''; - $request = $this->corporateSubAccountIdDeleteRequest($id); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'corporateSubAccountIdDelete' - * - * @param int $id Id of the sub-account organization to be deleted (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function corporateSubAccountIdDeleteRequest($id) - { - // verify the required parameter 'id' is set - if ($id === null || (is_array($id) && count($id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $id when calling corporateSubAccountIdDelete' - ); - } - - $resourcePath = '/corporate/subAccount/{id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($id !== null) { - $resourcePath = str_replace( - '{' . 'id' . '}', - ObjectSerializer::toPathValue($id), - $resourcePath - ); - } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - - if($headers['Content-Type'] === 'application/json') { - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass) { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - // array has no __toString(), so we should encode it manually - if(is_array($httpBody)) { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); - } - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('api-key'); - if ($apiKey !== null) { - $headers['api-key'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'DELETE', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation corporateSubAccountIdGet - * - * Get sub-account details - * - * @param int $id Id of the sub-account organization (required) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \SendinBlue\Client\Model\SubAccountDetailsResponse - */ - public function corporateSubAccountIdGet($id) - { - list($response) = $this->corporateSubAccountIdGetWithHttpInfo($id); - return $response; - } - - /** - * Operation corporateSubAccountIdGetWithHttpInfo - * - * Get sub-account details - * - * @param int $id Id of the sub-account organization (required) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \SendinBlue\Client\Model\SubAccountDetailsResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function corporateSubAccountIdGetWithHttpInfo($id) - { - $returnType = '\SendinBlue\Client\Model\SubAccountDetailsResponse'; - $request = $this->corporateSubAccountIdGetRequest($id); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\SubAccountDetailsResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation corporateSubAccountIdGetAsync - * - * Get sub-account details - * - * @param int $id Id of the sub-account organization (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function corporateSubAccountIdGetAsync($id) - { - return $this->corporateSubAccountIdGetAsyncWithHttpInfo($id) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation corporateSubAccountIdGetAsyncWithHttpInfo - * - * Get sub-account details - * - * @param int $id Id of the sub-account organization (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function corporateSubAccountIdGetAsyncWithHttpInfo($id) - { - $returnType = '\SendinBlue\Client\Model\SubAccountDetailsResponse'; - $request = $this->corporateSubAccountIdGetRequest($id); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'corporateSubAccountIdGet' - * - * @param int $id Id of the sub-account organization (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function corporateSubAccountIdGetRequest($id) - { - // verify the required parameter 'id' is set - if ($id === null || (is_array($id) && count($id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $id when calling corporateSubAccountIdGet' - ); - } - - $resourcePath = '/corporate/subAccount/{id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($id !== null) { - $resourcePath = str_replace( - '{' . 'id' . '}', - ObjectSerializer::toPathValue($id), - $resourcePath - ); - } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - - if($headers['Content-Type'] === 'application/json') { - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass) { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - // array has no __toString(), so we should encode it manually - if(is_array($httpBody)) { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); - } - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('api-key'); - if ($apiKey !== null) { - $headers['api-key'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation corporateSubAccountIdPlanPut - * - * Update sub-account plan - * - * @param int $id Id of the sub-account organization (required) - * @param \SendinBlue\Client\Model\SubAccountUpdatePlanRequest $updatePlanDetails Values to update a sub-account plan (required) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - */ - public function corporateSubAccountIdPlanPut($id, $updatePlanDetails) - { - $this->corporateSubAccountIdPlanPutWithHttpInfo($id, $updatePlanDetails); - } - - /** - * Operation corporateSubAccountIdPlanPutWithHttpInfo - * - * Update sub-account plan - * - * @param int $id Id of the sub-account organization (required) - * @param \SendinBlue\Client\Model\SubAccountUpdatePlanRequest $updatePlanDetails Values to update a sub-account plan (required) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function corporateSubAccountIdPlanPutWithHttpInfo($id, $updatePlanDetails) - { - $returnType = ''; - $request = $this->corporateSubAccountIdPlanPutRequest($id, $updatePlanDetails); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\ErrorModel', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 403: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\ErrorModel', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation corporateSubAccountIdPlanPutAsync - * - * Update sub-account plan - * - * @param int $id Id of the sub-account organization (required) - * @param \SendinBlue\Client\Model\SubAccountUpdatePlanRequest $updatePlanDetails Values to update a sub-account plan (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function corporateSubAccountIdPlanPutAsync($id, $updatePlanDetails) - { - return $this->corporateSubAccountIdPlanPutAsyncWithHttpInfo($id, $updatePlanDetails) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation corporateSubAccountIdPlanPutAsyncWithHttpInfo - * - * Update sub-account plan - * - * @param int $id Id of the sub-account organization (required) - * @param \SendinBlue\Client\Model\SubAccountUpdatePlanRequest $updatePlanDetails Values to update a sub-account plan (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function corporateSubAccountIdPlanPutAsyncWithHttpInfo($id, $updatePlanDetails) - { - $returnType = ''; - $request = $this->corporateSubAccountIdPlanPutRequest($id, $updatePlanDetails); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'corporateSubAccountIdPlanPut' - * - * @param int $id Id of the sub-account organization (required) - * @param \SendinBlue\Client\Model\SubAccountUpdatePlanRequest $updatePlanDetails Values to update a sub-account plan (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function corporateSubAccountIdPlanPutRequest($id, $updatePlanDetails) - { - // verify the required parameter 'id' is set - if ($id === null || (is_array($id) && count($id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $id when calling corporateSubAccountIdPlanPut' - ); - } - // verify the required parameter 'updatePlanDetails' is set - if ($updatePlanDetails === null || (is_array($updatePlanDetails) && count($updatePlanDetails) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $updatePlanDetails when calling corporateSubAccountIdPlanPut' - ); - } - - $resourcePath = '/corporate/subAccount/{id}/plan'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($id !== null) { - $resourcePath = str_replace( - '{' . 'id' . '}', - ObjectSerializer::toPathValue($id), - $resourcePath - ); - } - - // body params - $_tempBody = null; - if (isset($updatePlanDetails)) { - $_tempBody = $updatePlanDetails; - } - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - - if($headers['Content-Type'] === 'application/json') { - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass) { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - // array has no __toString(), so we should encode it manually - if(is_array($httpBody)) { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); - } - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('api-key'); - if ($apiKey !== null) { - $headers['api-key'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'PUT', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation corporateSubAccountPost - * - * Create a new sub-account under a master account. - * - * @param \SendinBlue\Client\Model\CreateSubAccount $subAccountCreate values to create new sub-account (required) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \SendinBlue\Client\Model\CreateSubAccountResponse - */ - public function corporateSubAccountPost($subAccountCreate) - { - list($response) = $this->corporateSubAccountPostWithHttpInfo($subAccountCreate); - return $response; - } - - /** - * Operation corporateSubAccountPostWithHttpInfo - * - * Create a new sub-account under a master account. - * - * @param \SendinBlue\Client\Model\CreateSubAccount $subAccountCreate values to create new sub-account (required) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \SendinBlue\Client\Model\CreateSubAccountResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function corporateSubAccountPostWithHttpInfo($subAccountCreate) - { - $returnType = '\SendinBlue\Client\Model\CreateSubAccountResponse'; - $request = $this->corporateSubAccountPostRequest($subAccountCreate); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 201: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\CreateSubAccountResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\ErrorModel', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation corporateSubAccountPostAsync - * - * Create a new sub-account under a master account. - * - * @param \SendinBlue\Client\Model\CreateSubAccount $subAccountCreate values to create new sub-account (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function corporateSubAccountPostAsync($subAccountCreate) - { - return $this->corporateSubAccountPostAsyncWithHttpInfo($subAccountCreate) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation corporateSubAccountPostAsyncWithHttpInfo - * - * Create a new sub-account under a master account. - * - * @param \SendinBlue\Client\Model\CreateSubAccount $subAccountCreate values to create new sub-account (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function corporateSubAccountPostAsyncWithHttpInfo($subAccountCreate) - { - $returnType = '\SendinBlue\Client\Model\CreateSubAccountResponse'; - $request = $this->corporateSubAccountPostRequest($subAccountCreate); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'corporateSubAccountPost' - * - * @param \SendinBlue\Client\Model\CreateSubAccount $subAccountCreate values to create new sub-account (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function corporateSubAccountPostRequest($subAccountCreate) - { - // verify the required parameter 'subAccountCreate' is set - if ($subAccountCreate === null || (is_array($subAccountCreate) && count($subAccountCreate) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $subAccountCreate when calling corporateSubAccountPost' - ); - } - - $resourcePath = '/corporate/subAccount'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // body params - $_tempBody = null; - if (isset($subAccountCreate)) { - $_tempBody = $subAccountCreate; - } - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - - if($headers['Content-Type'] === 'application/json') { - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass) { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - // array has no __toString(), so we should encode it manually - if(is_array($httpBody)) { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); - } - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('api-key'); - if ($apiKey !== null) { - $headers['api-key'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation corporateSubAccountSsoTokenPost - * - * Generate SSO token to access Sendinblue - * - * @param \SendinBlue\Client\Model\SsoTokenRequest $ssoTokenRequest Values to generate SSO token for sub-account (required) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \SendinBlue\Client\Model\GetSsoToken - */ - public function corporateSubAccountSsoTokenPost($ssoTokenRequest) - { - list($response) = $this->corporateSubAccountSsoTokenPostWithHttpInfo($ssoTokenRequest); - return $response; - } - - /** - * Operation corporateSubAccountSsoTokenPostWithHttpInfo - * - * Generate SSO token to access Sendinblue - * - * @param \SendinBlue\Client\Model\SsoTokenRequest $ssoTokenRequest Values to generate SSO token for sub-account (required) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \SendinBlue\Client\Model\GetSsoToken, HTTP status code, HTTP response headers (array of strings) - */ - public function corporateSubAccountSsoTokenPostWithHttpInfo($ssoTokenRequest) - { - $returnType = '\SendinBlue\Client\Model\GetSsoToken'; - $request = $this->corporateSubAccountSsoTokenPostRequest($ssoTokenRequest); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\GetSsoToken', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\ErrorModel', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 403: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\ErrorModel', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation corporateSubAccountSsoTokenPostAsync - * - * Generate SSO token to access Sendinblue - * - * @param \SendinBlue\Client\Model\SsoTokenRequest $ssoTokenRequest Values to generate SSO token for sub-account (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function corporateSubAccountSsoTokenPostAsync($ssoTokenRequest) - { - return $this->corporateSubAccountSsoTokenPostAsyncWithHttpInfo($ssoTokenRequest) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation corporateSubAccountSsoTokenPostAsyncWithHttpInfo - * - * Generate SSO token to access Sendinblue - * - * @param \SendinBlue\Client\Model\SsoTokenRequest $ssoTokenRequest Values to generate SSO token for sub-account (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function corporateSubAccountSsoTokenPostAsyncWithHttpInfo($ssoTokenRequest) - { - $returnType = '\SendinBlue\Client\Model\GetSsoToken'; - $request = $this->corporateSubAccountSsoTokenPostRequest($ssoTokenRequest); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'corporateSubAccountSsoTokenPost' - * - * @param \SendinBlue\Client\Model\SsoTokenRequest $ssoTokenRequest Values to generate SSO token for sub-account (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function corporateSubAccountSsoTokenPostRequest($ssoTokenRequest) - { - // verify the required parameter 'ssoTokenRequest' is set - if ($ssoTokenRequest === null || (is_array($ssoTokenRequest) && count($ssoTokenRequest) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $ssoTokenRequest when calling corporateSubAccountSsoTokenPost' - ); - } - - $resourcePath = '/corporate/subAccount/ssoToken'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // body params - $_tempBody = null; - if (isset($ssoTokenRequest)) { - $_tempBody = $ssoTokenRequest; - } - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - - if($headers['Content-Type'] === 'application/json') { - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass) { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - // array has no __toString(), so we should encode it manually - if(is_array($httpBody)) { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); - } - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('api-key'); - if ($apiKey !== null) { - $headers['api-key'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Create http client option - * - * @throws \RuntimeException on file opening failure - * @return array of http client options - */ - protected function createHttpClientOption() - { - $options = []; - if ($this->config->getDebug()) { - $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); - if (!$options[RequestOptions::DEBUG]) { - throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); - } - } - - return $options; - } -} diff --git a/lib/Api/ProcessApi.php b/lib/Api/ProcessApi.php index 0de1c302..f9a8a8ff 100644 --- a/lib/Api/ProcessApi.php +++ b/lib/Api/ProcessApi.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -92,15 +92,15 @@ public function getConfig() * * Return the informations for a process * - * @param int $processId Id of the process (required) + * @param int $process_id Id of the process (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\GetProcess */ - public function getProcess($processId) + public function getProcess($process_id) { - list($response) = $this->getProcessWithHttpInfo($processId); + list($response) = $this->getProcessWithHttpInfo($process_id); return $response; } @@ -109,16 +109,16 @@ public function getProcess($processId) * * Return the informations for a process * - * @param int $processId Id of the process (required) + * @param int $process_id Id of the process (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\GetProcess, HTTP status code, HTTP response headers (array of strings) */ - public function getProcessWithHttpInfo($processId) + public function getProcessWithHttpInfo($process_id) { $returnType = '\SendinBlue\Client\Model\GetProcess'; - $request = $this->getProcessRequest($processId); + $request = $this->getProcessRequest($process_id); try { $options = $this->createHttpClientOption(); @@ -174,7 +174,7 @@ public function getProcessWithHttpInfo($processId) ); $e->setResponseObject($data); break; - case 400: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -182,7 +182,7 @@ public function getProcessWithHttpInfo($processId) ); $e->setResponseObject($data); break; - case 404: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -200,14 +200,14 @@ public function getProcessWithHttpInfo($processId) * * Return the informations for a process * - * @param int $processId Id of the process (required) + * @param int $process_id Id of the process (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getProcessAsync($processId) + public function getProcessAsync($process_id) { - return $this->getProcessAsyncWithHttpInfo($processId) + return $this->getProcessAsyncWithHttpInfo($process_id) ->then( function ($response) { return $response[0]; @@ -220,15 +220,15 @@ function ($response) { * * Return the informations for a process * - * @param int $processId Id of the process (required) + * @param int $process_id Id of the process (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getProcessAsyncWithHttpInfo($processId) + public function getProcessAsyncWithHttpInfo($process_id) { $returnType = '\SendinBlue\Client\Model\GetProcess'; - $request = $this->getProcessRequest($processId); + $request = $this->getProcessRequest($process_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -270,17 +270,17 @@ function ($exception) { /** * Create request for operation 'getProcess' * - * @param int $processId Id of the process (required) + * @param int $process_id Id of the process (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getProcessRequest($processId) + protected function getProcessRequest($process_id) { - // verify the required parameter 'processId' is set - if ($processId === null || (is_array($processId) && count($processId) === 0)) { + // verify the required parameter 'process_id' is set + if ($process_id === null || (is_array($process_id) && count($process_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $processId when calling getProcess' + 'Missing the required parameter $process_id when calling getProcess' ); } @@ -293,10 +293,10 @@ protected function getProcessRequest($processId) // path params - if ($processId !== null) { + if ($process_id !== null) { $resourcePath = str_replace( '{' . 'processId' . '}', - ObjectSerializer::toPathValue($processId), + ObjectSerializer::toPathValue($process_id), $resourcePath ); } @@ -356,11 +356,6 @@ protected function getProcessRequest($processId) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -389,15 +384,14 @@ protected function getProcessRequest($processId) * * @param int $limit Number limitation for the result returned (optional, default to 10) * @param int $offset Beginning point in the list to retrieve from. (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\GetProcesses */ - public function getProcesses($limit = '10', $offset = '0', $sort = 'desc') + public function getProcesses($limit = '10', $offset = '0') { - list($response) = $this->getProcessesWithHttpInfo($limit, $offset, $sort); + list($response) = $this->getProcessesWithHttpInfo($limit, $offset); return $response; } @@ -408,16 +402,15 @@ public function getProcesses($limit = '10', $offset = '0', $sort = 'desc') * * @param int $limit Number limitation for the result returned (optional, default to 10) * @param int $offset Beginning point in the list to retrieve from. (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\GetProcesses, HTTP status code, HTTP response headers (array of strings) */ - public function getProcessesWithHttpInfo($limit = '10', $offset = '0', $sort = 'desc') + public function getProcessesWithHttpInfo($limit = '10', $offset = '0') { $returnType = '\SendinBlue\Client\Model\GetProcesses'; - $request = $this->getProcessesRequest($limit, $offset, $sort); + $request = $this->getProcessesRequest($limit, $offset); try { $options = $this->createHttpClientOption(); @@ -493,14 +486,13 @@ public function getProcessesWithHttpInfo($limit = '10', $offset = '0', $sort = ' * * @param int $limit Number limitation for the result returned (optional, default to 10) * @param int $offset Beginning point in the list to retrieve from. (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getProcessesAsync($limit = '10', $offset = '0', $sort = 'desc') + public function getProcessesAsync($limit = '10', $offset = '0') { - return $this->getProcessesAsyncWithHttpInfo($limit, $offset, $sort) + return $this->getProcessesAsyncWithHttpInfo($limit, $offset) ->then( function ($response) { return $response[0]; @@ -515,15 +507,14 @@ function ($response) { * * @param int $limit Number limitation for the result returned (optional, default to 10) * @param int $offset Beginning point in the list to retrieve from. (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getProcessesAsyncWithHttpInfo($limit = '10', $offset = '0', $sort = 'desc') + public function getProcessesAsyncWithHttpInfo($limit = '10', $offset = '0') { $returnType = '\SendinBlue\Client\Model\GetProcesses'; - $request = $this->getProcessesRequest($limit, $offset, $sort); + $request = $this->getProcessesRequest($limit, $offset); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -567,12 +558,11 @@ function ($exception) { * * @param int $limit Number limitation for the result returned (optional, default to 10) * @param int $offset Beginning point in the list to retrieve from. (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getProcessesRequest($limit = '10', $offset = '0', $sort = 'desc') + protected function getProcessesRequest($limit = '10', $offset = '0') { if ($limit !== null && $limit > 50) { throw new \InvalidArgumentException('invalid value for "$limit" when calling ProcessApi.getProcesses, must be smaller than or equal to 50.'); @@ -594,10 +584,6 @@ protected function getProcessesRequest($limit = '10', $offset = '0', $sort = 'de if ($offset !== null) { $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); } - // query params - if ($sort !== null) { - $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); - } // body params @@ -655,11 +641,6 @@ protected function getProcessesRequest($limit = '10', $offset = '0', $sort = 'de if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { diff --git a/lib/Api/ResellerApi.php b/lib/Api/ResellerApi.php index 26dd8bf9..96405bdb 100644 --- a/lib/Api/ResellerApi.php +++ b/lib/Api/ResellerApi.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -92,16 +92,16 @@ public function getConfig() * * Add Email and/or SMS credits to a specific child account * - * @param string $childIdentifier Either auth key or id of reseller's child (required) - * @param \SendinBlue\Client\Model\AddCredits $addCredits Values to post to add credit to a specific child account (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) + * @param \SendinBlue\Client\Model\AddCredits $add_credits Values to post to add credit to a specific child account (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\RemainingCreditModel */ - public function addCredits($childIdentifier, $addCredits) + public function addCredits($child_identifier, $add_credits) { - list($response) = $this->addCreditsWithHttpInfo($childIdentifier, $addCredits); + list($response) = $this->addCreditsWithHttpInfo($child_identifier, $add_credits); return $response; } @@ -110,17 +110,17 @@ public function addCredits($childIdentifier, $addCredits) * * Add Email and/or SMS credits to a specific child account * - * @param string $childIdentifier Either auth key or id of reseller's child (required) - * @param \SendinBlue\Client\Model\AddCredits $addCredits Values to post to add credit to a specific child account (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) + * @param \SendinBlue\Client\Model\AddCredits $add_credits Values to post to add credit to a specific child account (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\RemainingCreditModel, HTTP status code, HTTP response headers (array of strings) */ - public function addCreditsWithHttpInfo($childIdentifier, $addCredits) + public function addCreditsWithHttpInfo($child_identifier, $add_credits) { $returnType = '\SendinBlue\Client\Model\RemainingCreditModel'; - $request = $this->addCreditsRequest($childIdentifier, $addCredits); + $request = $this->addCreditsRequest($child_identifier, $add_credits); try { $options = $this->createHttpClientOption(); @@ -184,7 +184,7 @@ public function addCreditsWithHttpInfo($childIdentifier, $addCredits) ); $e->setResponseObject($data); break; - case 403: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -192,7 +192,7 @@ public function addCreditsWithHttpInfo($childIdentifier, $addCredits) ); $e->setResponseObject($data); break; - case 404: + case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -210,15 +210,15 @@ public function addCreditsWithHttpInfo($childIdentifier, $addCredits) * * Add Email and/or SMS credits to a specific child account * - * @param string $childIdentifier Either auth key or id of reseller's child (required) - * @param \SendinBlue\Client\Model\AddCredits $addCredits Values to post to add credit to a specific child account (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) + * @param \SendinBlue\Client\Model\AddCredits $add_credits Values to post to add credit to a specific child account (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addCreditsAsync($childIdentifier, $addCredits) + public function addCreditsAsync($child_identifier, $add_credits) { - return $this->addCreditsAsyncWithHttpInfo($childIdentifier, $addCredits) + return $this->addCreditsAsyncWithHttpInfo($child_identifier, $add_credits) ->then( function ($response) { return $response[0]; @@ -231,16 +231,16 @@ function ($response) { * * Add Email and/or SMS credits to a specific child account * - * @param string $childIdentifier Either auth key or id of reseller's child (required) - * @param \SendinBlue\Client\Model\AddCredits $addCredits Values to post to add credit to a specific child account (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) + * @param \SendinBlue\Client\Model\AddCredits $add_credits Values to post to add credit to a specific child account (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addCreditsAsyncWithHttpInfo($childIdentifier, $addCredits) + public function addCreditsAsyncWithHttpInfo($child_identifier, $add_credits) { $returnType = '\SendinBlue\Client\Model\RemainingCreditModel'; - $request = $this->addCreditsRequest($childIdentifier, $addCredits); + $request = $this->addCreditsRequest($child_identifier, $add_credits); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -282,24 +282,24 @@ function ($exception) { /** * Create request for operation 'addCredits' * - * @param string $childIdentifier Either auth key or id of reseller's child (required) - * @param \SendinBlue\Client\Model\AddCredits $addCredits Values to post to add credit to a specific child account (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) + * @param \SendinBlue\Client\Model\AddCredits $add_credits Values to post to add credit to a specific child account (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function addCreditsRequest($childIdentifier, $addCredits) + protected function addCreditsRequest($child_identifier, $add_credits) { - // verify the required parameter 'childIdentifier' is set - if ($childIdentifier === null || (is_array($childIdentifier) && count($childIdentifier) === 0)) { + // verify the required parameter 'child_identifier' is set + if ($child_identifier === null || (is_array($child_identifier) && count($child_identifier) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $childIdentifier when calling addCredits' + 'Missing the required parameter $child_identifier when calling addCredits' ); } - // verify the required parameter 'addCredits' is set - if ($addCredits === null || (is_array($addCredits) && count($addCredits) === 0)) { + // verify the required parameter 'add_credits' is set + if ($add_credits === null || (is_array($add_credits) && count($add_credits) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $addCredits when calling addCredits' + 'Missing the required parameter $add_credits when calling addCredits' ); } @@ -312,18 +312,18 @@ protected function addCreditsRequest($childIdentifier, $addCredits) // path params - if ($childIdentifier !== null) { + if ($child_identifier !== null) { $resourcePath = str_replace( '{' . 'childIdentifier' . '}', - ObjectSerializer::toPathValue($childIdentifier), + ObjectSerializer::toPathValue($child_identifier), $resourcePath ); } // body params $_tempBody = null; - if (isset($addCredits)) { - $_tempBody = $addCredits; + if (isset($add_credits)) { + $_tempBody = $add_credits; } if ($multipart) { @@ -378,11 +378,6 @@ protected function addCreditsRequest($childIdentifier, $addCredits) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -409,16 +404,16 @@ protected function addCreditsRequest($childIdentifier, $addCredits) * * Associate a dedicated IP to the child * - * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) * @param \SendinBlue\Client\Model\ManageIp $ip IP to associate (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function associateIpToChild($childIdentifier, $ip) + public function associateIpToChild($child_identifier, $ip) { - $this->associateIpToChildWithHttpInfo($childIdentifier, $ip); + $this->associateIpToChildWithHttpInfo($child_identifier, $ip); } /** @@ -426,17 +421,17 @@ public function associateIpToChild($childIdentifier, $ip) * * Associate a dedicated IP to the child * - * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) * @param \SendinBlue\Client\Model\ManageIp $ip IP to associate (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function associateIpToChildWithHttpInfo($childIdentifier, $ip) + public function associateIpToChildWithHttpInfo($child_identifier, $ip) { $returnType = ''; - $request = $this->associateIpToChildRequest($childIdentifier, $ip); + $request = $this->associateIpToChildRequest($child_identifier, $ip); try { $options = $this->createHttpClientOption(); @@ -496,15 +491,15 @@ public function associateIpToChildWithHttpInfo($childIdentifier, $ip) * * Associate a dedicated IP to the child * - * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) * @param \SendinBlue\Client\Model\ManageIp $ip IP to associate (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function associateIpToChildAsync($childIdentifier, $ip) + public function associateIpToChildAsync($child_identifier, $ip) { - return $this->associateIpToChildAsyncWithHttpInfo($childIdentifier, $ip) + return $this->associateIpToChildAsyncWithHttpInfo($child_identifier, $ip) ->then( function ($response) { return $response[0]; @@ -517,16 +512,16 @@ function ($response) { * * Associate a dedicated IP to the child * - * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) * @param \SendinBlue\Client\Model\ManageIp $ip IP to associate (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function associateIpToChildAsyncWithHttpInfo($childIdentifier, $ip) + public function associateIpToChildAsyncWithHttpInfo($child_identifier, $ip) { $returnType = ''; - $request = $this->associateIpToChildRequest($childIdentifier, $ip); + $request = $this->associateIpToChildRequest($child_identifier, $ip); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -554,18 +549,18 @@ function ($exception) { /** * Create request for operation 'associateIpToChild' * - * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) * @param \SendinBlue\Client\Model\ManageIp $ip IP to associate (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function associateIpToChildRequest($childIdentifier, $ip) + protected function associateIpToChildRequest($child_identifier, $ip) { - // verify the required parameter 'childIdentifier' is set - if ($childIdentifier === null || (is_array($childIdentifier) && count($childIdentifier) === 0)) { + // verify the required parameter 'child_identifier' is set + if ($child_identifier === null || (is_array($child_identifier) && count($child_identifier) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $childIdentifier when calling associateIpToChild' + 'Missing the required parameter $child_identifier when calling associateIpToChild' ); } // verify the required parameter 'ip' is set @@ -584,10 +579,10 @@ protected function associateIpToChildRequest($childIdentifier, $ip) // path params - if ($childIdentifier !== null) { + if ($child_identifier !== null) { $resourcePath = str_replace( '{' . 'childIdentifier' . '}', - ObjectSerializer::toPathValue($childIdentifier), + ObjectSerializer::toPathValue($child_identifier), $resourcePath ); } @@ -650,11 +645,6 @@ protected function associateIpToChildRequest($childIdentifier, $ip) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -681,16 +671,16 @@ protected function associateIpToChildRequest($childIdentifier, $ip) * * Create a domain for a child account * - * @param string $childIdentifier Either auth key or id of reseller's child (required) - * @param \SendinBlue\Client\Model\AddChildDomain $addChildDomain Sender domain to add for a specific child account. This will not be displayed to the parent account. (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) + * @param \SendinBlue\Client\Model\AddChildDomain $add_child_domain Sender domain to add for a specific child account. This will not be displayed to the parent account. (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function createChildDomain($childIdentifier, $addChildDomain) + public function createChildDomain($child_identifier, $add_child_domain) { - $this->createChildDomainWithHttpInfo($childIdentifier, $addChildDomain); + $this->createChildDomainWithHttpInfo($child_identifier, $add_child_domain); } /** @@ -698,17 +688,17 @@ public function createChildDomain($childIdentifier, $addChildDomain) * * Create a domain for a child account * - * @param string $childIdentifier Either auth key or id of reseller's child (required) - * @param \SendinBlue\Client\Model\AddChildDomain $addChildDomain Sender domain to add for a specific child account. This will not be displayed to the parent account. (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) + * @param \SendinBlue\Client\Model\AddChildDomain $add_child_domain Sender domain to add for a specific child account. This will not be displayed to the parent account. (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function createChildDomainWithHttpInfo($childIdentifier, $addChildDomain) + public function createChildDomainWithHttpInfo($child_identifier, $add_child_domain) { $returnType = ''; - $request = $this->createChildDomainRequest($childIdentifier, $addChildDomain); + $request = $this->createChildDomainRequest($child_identifier, $add_child_domain); try { $options = $this->createHttpClientOption(); @@ -750,7 +740,7 @@ public function createChildDomainWithHttpInfo($childIdentifier, $addChildDomain) ); $e->setResponseObject($data); break; - case 403: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -758,7 +748,7 @@ public function createChildDomainWithHttpInfo($childIdentifier, $addChildDomain) ); $e->setResponseObject($data); break; - case 404: + case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -776,15 +766,15 @@ public function createChildDomainWithHttpInfo($childIdentifier, $addChildDomain) * * Create a domain for a child account * - * @param string $childIdentifier Either auth key or id of reseller's child (required) - * @param \SendinBlue\Client\Model\AddChildDomain $addChildDomain Sender domain to add for a specific child account. This will not be displayed to the parent account. (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) + * @param \SendinBlue\Client\Model\AddChildDomain $add_child_domain Sender domain to add for a specific child account. This will not be displayed to the parent account. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createChildDomainAsync($childIdentifier, $addChildDomain) + public function createChildDomainAsync($child_identifier, $add_child_domain) { - return $this->createChildDomainAsyncWithHttpInfo($childIdentifier, $addChildDomain) + return $this->createChildDomainAsyncWithHttpInfo($child_identifier, $add_child_domain) ->then( function ($response) { return $response[0]; @@ -797,16 +787,16 @@ function ($response) { * * Create a domain for a child account * - * @param string $childIdentifier Either auth key or id of reseller's child (required) - * @param \SendinBlue\Client\Model\AddChildDomain $addChildDomain Sender domain to add for a specific child account. This will not be displayed to the parent account. (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) + * @param \SendinBlue\Client\Model\AddChildDomain $add_child_domain Sender domain to add for a specific child account. This will not be displayed to the parent account. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createChildDomainAsyncWithHttpInfo($childIdentifier, $addChildDomain) + public function createChildDomainAsyncWithHttpInfo($child_identifier, $add_child_domain) { $returnType = ''; - $request = $this->createChildDomainRequest($childIdentifier, $addChildDomain); + $request = $this->createChildDomainRequest($child_identifier, $add_child_domain); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -834,24 +824,24 @@ function ($exception) { /** * Create request for operation 'createChildDomain' * - * @param string $childIdentifier Either auth key or id of reseller's child (required) - * @param \SendinBlue\Client\Model\AddChildDomain $addChildDomain Sender domain to add for a specific child account. This will not be displayed to the parent account. (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) + * @param \SendinBlue\Client\Model\AddChildDomain $add_child_domain Sender domain to add for a specific child account. This will not be displayed to the parent account. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function createChildDomainRequest($childIdentifier, $addChildDomain) + protected function createChildDomainRequest($child_identifier, $add_child_domain) { - // verify the required parameter 'childIdentifier' is set - if ($childIdentifier === null || (is_array($childIdentifier) && count($childIdentifier) === 0)) { + // verify the required parameter 'child_identifier' is set + if ($child_identifier === null || (is_array($child_identifier) && count($child_identifier) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $childIdentifier when calling createChildDomain' + 'Missing the required parameter $child_identifier when calling createChildDomain' ); } - // verify the required parameter 'addChildDomain' is set - if ($addChildDomain === null || (is_array($addChildDomain) && count($addChildDomain) === 0)) { + // verify the required parameter 'add_child_domain' is set + if ($add_child_domain === null || (is_array($add_child_domain) && count($add_child_domain) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $addChildDomain when calling createChildDomain' + 'Missing the required parameter $add_child_domain when calling createChildDomain' ); } @@ -864,18 +854,18 @@ protected function createChildDomainRequest($childIdentifier, $addChildDomain) // path params - if ($childIdentifier !== null) { + if ($child_identifier !== null) { $resourcePath = str_replace( '{' . 'childIdentifier' . '}', - ObjectSerializer::toPathValue($childIdentifier), + ObjectSerializer::toPathValue($child_identifier), $resourcePath ); } // body params $_tempBody = null; - if (isset($addChildDomain)) { - $_tempBody = $addChildDomain; + if (isset($add_child_domain)) { + $_tempBody = $add_child_domain; } if ($multipart) { @@ -930,11 +920,6 @@ protected function createChildDomainRequest($childIdentifier, $addChildDomain) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -961,15 +946,15 @@ protected function createChildDomainRequest($childIdentifier, $addChildDomain) * * Creates a reseller child * - * @param \SendinBlue\Client\Model\CreateChild $resellerChild reseller child to add (optional) + * @param \SendinBlue\Client\Model\CreateChild $reseller_child reseller child to add (optional) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\CreateReseller */ - public function createResellerChild($resellerChild = null) + public function createResellerChild($reseller_child = null) { - list($response) = $this->createResellerChildWithHttpInfo($resellerChild); + list($response) = $this->createResellerChildWithHttpInfo($reseller_child); return $response; } @@ -978,16 +963,16 @@ public function createResellerChild($resellerChild = null) * * Creates a reseller child * - * @param \SendinBlue\Client\Model\CreateChild $resellerChild reseller child to add (optional) + * @param \SendinBlue\Client\Model\CreateChild $reseller_child reseller child to add (optional) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\CreateReseller, HTTP status code, HTTP response headers (array of strings) */ - public function createResellerChildWithHttpInfo($resellerChild = null) + public function createResellerChildWithHttpInfo($reseller_child = null) { $returnType = '\SendinBlue\Client\Model\CreateReseller'; - $request = $this->createResellerChildRequest($resellerChild); + $request = $this->createResellerChildRequest($reseller_child); try { $options = $this->createHttpClientOption(); @@ -1069,14 +1054,14 @@ public function createResellerChildWithHttpInfo($resellerChild = null) * * Creates a reseller child * - * @param \SendinBlue\Client\Model\CreateChild $resellerChild reseller child to add (optional) + * @param \SendinBlue\Client\Model\CreateChild $reseller_child reseller child to add (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createResellerChildAsync($resellerChild = null) + public function createResellerChildAsync($reseller_child = null) { - return $this->createResellerChildAsyncWithHttpInfo($resellerChild) + return $this->createResellerChildAsyncWithHttpInfo($reseller_child) ->then( function ($response) { return $response[0]; @@ -1089,15 +1074,15 @@ function ($response) { * * Creates a reseller child * - * @param \SendinBlue\Client\Model\CreateChild $resellerChild reseller child to add (optional) + * @param \SendinBlue\Client\Model\CreateChild $reseller_child reseller child to add (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createResellerChildAsyncWithHttpInfo($resellerChild = null) + public function createResellerChildAsyncWithHttpInfo($reseller_child = null) { $returnType = '\SendinBlue\Client\Model\CreateReseller'; - $request = $this->createResellerChildRequest($resellerChild); + $request = $this->createResellerChildRequest($reseller_child); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1139,12 +1124,12 @@ function ($exception) { /** * Create request for operation 'createResellerChild' * - * @param \SendinBlue\Client\Model\CreateChild $resellerChild reseller child to add (optional) + * @param \SendinBlue\Client\Model\CreateChild $reseller_child reseller child to add (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function createResellerChildRequest($resellerChild = null) + protected function createResellerChildRequest($reseller_child = null) { $resourcePath = '/reseller/children'; @@ -1158,8 +1143,8 @@ protected function createResellerChildRequest($resellerChild = null) // body params $_tempBody = null; - if (isset($resellerChild)) { - $_tempBody = $resellerChild; + if (isset($reseller_child)) { + $_tempBody = $reseller_child; } if ($multipart) { @@ -1214,11 +1199,6 @@ protected function createResellerChildRequest($resellerChild = null) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1245,16 +1225,16 @@ protected function createResellerChildRequest($resellerChild = null) * * Delete the sender domain of the reseller child based on the childIdentifier and domainName passed * - * @param string $childIdentifier Either auth key or id of reseller's child (required) - * @param string $domainName Pass the existing domain that needs to be deleted (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) + * @param string $domain_name Pass the existing domain that needs to be deleted (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function deleteChildDomain($childIdentifier, $domainName) + public function deleteChildDomain($child_identifier, $domain_name) { - $this->deleteChildDomainWithHttpInfo($childIdentifier, $domainName); + $this->deleteChildDomainWithHttpInfo($child_identifier, $domain_name); } /** @@ -1262,17 +1242,17 @@ public function deleteChildDomain($childIdentifier, $domainName) * * Delete the sender domain of the reseller child based on the childIdentifier and domainName passed * - * @param string $childIdentifier Either auth key or id of reseller's child (required) - * @param string $domainName Pass the existing domain that needs to be deleted (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) + * @param string $domain_name Pass the existing domain that needs to be deleted (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteChildDomainWithHttpInfo($childIdentifier, $domainName) + public function deleteChildDomainWithHttpInfo($child_identifier, $domain_name) { $returnType = ''; - $request = $this->deleteChildDomainRequest($childIdentifier, $domainName); + $request = $this->deleteChildDomainRequest($child_identifier, $domain_name); try { $options = $this->createHttpClientOption(); @@ -1306,7 +1286,7 @@ public function deleteChildDomainWithHttpInfo($childIdentifier, $domainName) } catch (ApiException $e) { switch ($e->getCode()) { - case 400: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -1322,7 +1302,7 @@ public function deleteChildDomainWithHttpInfo($childIdentifier, $domainName) ); $e->setResponseObject($data); break; - case 404: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -1340,15 +1320,15 @@ public function deleteChildDomainWithHttpInfo($childIdentifier, $domainName) * * Delete the sender domain of the reseller child based on the childIdentifier and domainName passed * - * @param string $childIdentifier Either auth key or id of reseller's child (required) - * @param string $domainName Pass the existing domain that needs to be deleted (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) + * @param string $domain_name Pass the existing domain that needs to be deleted (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteChildDomainAsync($childIdentifier, $domainName) + public function deleteChildDomainAsync($child_identifier, $domain_name) { - return $this->deleteChildDomainAsyncWithHttpInfo($childIdentifier, $domainName) + return $this->deleteChildDomainAsyncWithHttpInfo($child_identifier, $domain_name) ->then( function ($response) { return $response[0]; @@ -1361,16 +1341,16 @@ function ($response) { * * Delete the sender domain of the reseller child based on the childIdentifier and domainName passed * - * @param string $childIdentifier Either auth key or id of reseller's child (required) - * @param string $domainName Pass the existing domain that needs to be deleted (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) + * @param string $domain_name Pass the existing domain that needs to be deleted (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteChildDomainAsyncWithHttpInfo($childIdentifier, $domainName) + public function deleteChildDomainAsyncWithHttpInfo($child_identifier, $domain_name) { $returnType = ''; - $request = $this->deleteChildDomainRequest($childIdentifier, $domainName); + $request = $this->deleteChildDomainRequest($child_identifier, $domain_name); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1398,24 +1378,24 @@ function ($exception) { /** * Create request for operation 'deleteChildDomain' * - * @param string $childIdentifier Either auth key or id of reseller's child (required) - * @param string $domainName Pass the existing domain that needs to be deleted (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) + * @param string $domain_name Pass the existing domain that needs to be deleted (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function deleteChildDomainRequest($childIdentifier, $domainName) + protected function deleteChildDomainRequest($child_identifier, $domain_name) { - // verify the required parameter 'childIdentifier' is set - if ($childIdentifier === null || (is_array($childIdentifier) && count($childIdentifier) === 0)) { + // verify the required parameter 'child_identifier' is set + if ($child_identifier === null || (is_array($child_identifier) && count($child_identifier) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $childIdentifier when calling deleteChildDomain' + 'Missing the required parameter $child_identifier when calling deleteChildDomain' ); } - // verify the required parameter 'domainName' is set - if ($domainName === null || (is_array($domainName) && count($domainName) === 0)) { + // verify the required parameter 'domain_name' is set + if ($domain_name === null || (is_array($domain_name) && count($domain_name) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $domainName when calling deleteChildDomain' + 'Missing the required parameter $domain_name when calling deleteChildDomain' ); } @@ -1428,18 +1408,18 @@ protected function deleteChildDomainRequest($childIdentifier, $domainName) // path params - if ($childIdentifier !== null) { + if ($child_identifier !== null) { $resourcePath = str_replace( '{' . 'childIdentifier' . '}', - ObjectSerializer::toPathValue($childIdentifier), + ObjectSerializer::toPathValue($child_identifier), $resourcePath ); } // path params - if ($domainName !== null) { + if ($domain_name !== null) { $resourcePath = str_replace( '{' . 'domainName' . '}', - ObjectSerializer::toPathValue($domainName), + ObjectSerializer::toPathValue($domain_name), $resourcePath ); } @@ -1499,11 +1479,6 @@ protected function deleteChildDomainRequest($childIdentifier, $domainName) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1530,15 +1505,15 @@ protected function deleteChildDomainRequest($childIdentifier, $domainName) * * Delete a single reseller child based on the child identifier supplied * - * @param string $childIdentifier Either auth key or child id of reseller's child (required) + * @param string $child_identifier Either auth key or child id of reseller's child (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function deleteResellerChild($childIdentifier) + public function deleteResellerChild($child_identifier) { - $this->deleteResellerChildWithHttpInfo($childIdentifier); + $this->deleteResellerChildWithHttpInfo($child_identifier); } /** @@ -1546,16 +1521,16 @@ public function deleteResellerChild($childIdentifier) * * Delete a single reseller child based on the child identifier supplied * - * @param string $childIdentifier Either auth key or child id of reseller's child (required) + * @param string $child_identifier Either auth key or child id of reseller's child (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteResellerChildWithHttpInfo($childIdentifier) + public function deleteResellerChildWithHttpInfo($child_identifier) { $returnType = ''; - $request = $this->deleteResellerChildRequest($childIdentifier); + $request = $this->deleteResellerChildRequest($child_identifier); try { $options = $this->createHttpClientOption(); @@ -1589,7 +1564,7 @@ public function deleteResellerChildWithHttpInfo($childIdentifier) } catch (ApiException $e) { switch ($e->getCode()) { - case 400: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -1605,7 +1580,7 @@ public function deleteResellerChildWithHttpInfo($childIdentifier) ); $e->setResponseObject($data); break; - case 404: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -1623,14 +1598,14 @@ public function deleteResellerChildWithHttpInfo($childIdentifier) * * Delete a single reseller child based on the child identifier supplied * - * @param string $childIdentifier Either auth key or child id of reseller's child (required) + * @param string $child_identifier Either auth key or child id of reseller's child (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteResellerChildAsync($childIdentifier) + public function deleteResellerChildAsync($child_identifier) { - return $this->deleteResellerChildAsyncWithHttpInfo($childIdentifier) + return $this->deleteResellerChildAsyncWithHttpInfo($child_identifier) ->then( function ($response) { return $response[0]; @@ -1643,15 +1618,15 @@ function ($response) { * * Delete a single reseller child based on the child identifier supplied * - * @param string $childIdentifier Either auth key or child id of reseller's child (required) + * @param string $child_identifier Either auth key or child id of reseller's child (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteResellerChildAsyncWithHttpInfo($childIdentifier) + public function deleteResellerChildAsyncWithHttpInfo($child_identifier) { $returnType = ''; - $request = $this->deleteResellerChildRequest($childIdentifier); + $request = $this->deleteResellerChildRequest($child_identifier); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1679,17 +1654,17 @@ function ($exception) { /** * Create request for operation 'deleteResellerChild' * - * @param string $childIdentifier Either auth key or child id of reseller's child (required) + * @param string $child_identifier Either auth key or child id of reseller's child (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function deleteResellerChildRequest($childIdentifier) + protected function deleteResellerChildRequest($child_identifier) { - // verify the required parameter 'childIdentifier' is set - if ($childIdentifier === null || (is_array($childIdentifier) && count($childIdentifier) === 0)) { + // verify the required parameter 'child_identifier' is set + if ($child_identifier === null || (is_array($child_identifier) && count($child_identifier) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $childIdentifier when calling deleteResellerChild' + 'Missing the required parameter $child_identifier when calling deleteResellerChild' ); } @@ -1702,10 +1677,10 @@ protected function deleteResellerChildRequest($childIdentifier) // path params - if ($childIdentifier !== null) { + if ($child_identifier !== null) { $resourcePath = str_replace( '{' . 'childIdentifier' . '}', - ObjectSerializer::toPathValue($childIdentifier), + ObjectSerializer::toPathValue($child_identifier), $resourcePath ); } @@ -1765,11 +1740,6 @@ protected function deleteResellerChildRequest($childIdentifier) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1796,16 +1766,16 @@ protected function deleteResellerChildRequest($childIdentifier) * * Dissociate a dedicated IP to the child * - * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) * @param \SendinBlue\Client\Model\ManageIp $ip IP to dissociate (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function dissociateIpFromChild($childIdentifier, $ip) + public function dissociateIpFromChild($child_identifier, $ip) { - $this->dissociateIpFromChildWithHttpInfo($childIdentifier, $ip); + $this->dissociateIpFromChildWithHttpInfo($child_identifier, $ip); } /** @@ -1813,17 +1783,17 @@ public function dissociateIpFromChild($childIdentifier, $ip) * * Dissociate a dedicated IP to the child * - * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) * @param \SendinBlue\Client\Model\ManageIp $ip IP to dissociate (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function dissociateIpFromChildWithHttpInfo($childIdentifier, $ip) + public function dissociateIpFromChildWithHttpInfo($child_identifier, $ip) { $returnType = ''; - $request = $this->dissociateIpFromChildRequest($childIdentifier, $ip); + $request = $this->dissociateIpFromChildRequest($child_identifier, $ip); try { $options = $this->createHttpClientOption(); @@ -1883,15 +1853,15 @@ public function dissociateIpFromChildWithHttpInfo($childIdentifier, $ip) * * Dissociate a dedicated IP to the child * - * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) * @param \SendinBlue\Client\Model\ManageIp $ip IP to dissociate (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function dissociateIpFromChildAsync($childIdentifier, $ip) + public function dissociateIpFromChildAsync($child_identifier, $ip) { - return $this->dissociateIpFromChildAsyncWithHttpInfo($childIdentifier, $ip) + return $this->dissociateIpFromChildAsyncWithHttpInfo($child_identifier, $ip) ->then( function ($response) { return $response[0]; @@ -1904,16 +1874,16 @@ function ($response) { * * Dissociate a dedicated IP to the child * - * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) * @param \SendinBlue\Client\Model\ManageIp $ip IP to dissociate (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function dissociateIpFromChildAsyncWithHttpInfo($childIdentifier, $ip) + public function dissociateIpFromChildAsyncWithHttpInfo($child_identifier, $ip) { $returnType = ''; - $request = $this->dissociateIpFromChildRequest($childIdentifier, $ip); + $request = $this->dissociateIpFromChildRequest($child_identifier, $ip); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1941,18 +1911,18 @@ function ($exception) { /** * Create request for operation 'dissociateIpFromChild' * - * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) * @param \SendinBlue\Client\Model\ManageIp $ip IP to dissociate (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function dissociateIpFromChildRequest($childIdentifier, $ip) + protected function dissociateIpFromChildRequest($child_identifier, $ip) { - // verify the required parameter 'childIdentifier' is set - if ($childIdentifier === null || (is_array($childIdentifier) && count($childIdentifier) === 0)) { + // verify the required parameter 'child_identifier' is set + if ($child_identifier === null || (is_array($child_identifier) && count($child_identifier) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $childIdentifier when calling dissociateIpFromChild' + 'Missing the required parameter $child_identifier when calling dissociateIpFromChild' ); } // verify the required parameter 'ip' is set @@ -1971,10 +1941,10 @@ protected function dissociateIpFromChildRequest($childIdentifier, $ip) // path params - if ($childIdentifier !== null) { + if ($child_identifier !== null) { $resourcePath = str_replace( '{' . 'childIdentifier' . '}', - ObjectSerializer::toPathValue($childIdentifier), + ObjectSerializer::toPathValue($child_identifier), $resourcePath ); } @@ -2037,11 +2007,6 @@ protected function dissociateIpFromChildRequest($childIdentifier, $ip) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -2066,35 +2031,35 @@ protected function dissociateIpFromChildRequest($childIdentifier, $ip) /** * Operation getChildAccountCreationStatus * - * Get the status of a reseller's child account creation, whether it is successfully created (exists) or not based on the identifier supplied + * Get the status of a reseller's child account creation, whether it is successfully created (exists) or not based on the childIdentifier supplied * - * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\GetChildAccountCreationStatus */ - public function getChildAccountCreationStatus($childIdentifier) + public function getChildAccountCreationStatus($child_identifier) { - list($response) = $this->getChildAccountCreationStatusWithHttpInfo($childIdentifier); + list($response) = $this->getChildAccountCreationStatusWithHttpInfo($child_identifier); return $response; } /** * Operation getChildAccountCreationStatusWithHttpInfo * - * Get the status of a reseller's child account creation, whether it is successfully created (exists) or not based on the identifier supplied + * Get the status of a reseller's child account creation, whether it is successfully created (exists) or not based on the childIdentifier supplied * - * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\GetChildAccountCreationStatus, HTTP status code, HTTP response headers (array of strings) */ - public function getChildAccountCreationStatusWithHttpInfo($childIdentifier) + public function getChildAccountCreationStatusWithHttpInfo($child_identifier) { $returnType = '\SendinBlue\Client\Model\GetChildAccountCreationStatus'; - $request = $this->getChildAccountCreationStatusRequest($childIdentifier); + $request = $this->getChildAccountCreationStatusRequest($child_identifier); try { $options = $this->createHttpClientOption(); @@ -2158,7 +2123,7 @@ public function getChildAccountCreationStatusWithHttpInfo($childIdentifier) ); $e->setResponseObject($data); break; - case 403: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -2166,7 +2131,7 @@ public function getChildAccountCreationStatusWithHttpInfo($childIdentifier) ); $e->setResponseObject($data); break; - case 404: + case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -2182,16 +2147,16 @@ public function getChildAccountCreationStatusWithHttpInfo($childIdentifier) /** * Operation getChildAccountCreationStatusAsync * - * Get the status of a reseller's child account creation, whether it is successfully created (exists) or not based on the identifier supplied + * Get the status of a reseller's child account creation, whether it is successfully created (exists) or not based on the childIdentifier supplied * - * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getChildAccountCreationStatusAsync($childIdentifier) + public function getChildAccountCreationStatusAsync($child_identifier) { - return $this->getChildAccountCreationStatusAsyncWithHttpInfo($childIdentifier) + return $this->getChildAccountCreationStatusAsyncWithHttpInfo($child_identifier) ->then( function ($response) { return $response[0]; @@ -2202,17 +2167,17 @@ function ($response) { /** * Operation getChildAccountCreationStatusAsyncWithHttpInfo * - * Get the status of a reseller's child account creation, whether it is successfully created (exists) or not based on the identifier supplied + * Get the status of a reseller's child account creation, whether it is successfully created (exists) or not based on the childIdentifier supplied * - * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getChildAccountCreationStatusAsyncWithHttpInfo($childIdentifier) + public function getChildAccountCreationStatusAsyncWithHttpInfo($child_identifier) { $returnType = '\SendinBlue\Client\Model\GetChildAccountCreationStatus'; - $request = $this->getChildAccountCreationStatusRequest($childIdentifier); + $request = $this->getChildAccountCreationStatusRequest($child_identifier); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2254,17 +2219,17 @@ function ($exception) { /** * Create request for operation 'getChildAccountCreationStatus' * - * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getChildAccountCreationStatusRequest($childIdentifier) + protected function getChildAccountCreationStatusRequest($child_identifier) { - // verify the required parameter 'childIdentifier' is set - if ($childIdentifier === null || (is_array($childIdentifier) && count($childIdentifier) === 0)) { + // verify the required parameter 'child_identifier' is set + if ($child_identifier === null || (is_array($child_identifier) && count($child_identifier) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $childIdentifier when calling getChildAccountCreationStatus' + 'Missing the required parameter $child_identifier when calling getChildAccountCreationStatus' ); } @@ -2277,10 +2242,10 @@ protected function getChildAccountCreationStatusRequest($childIdentifier) // path params - if ($childIdentifier !== null) { + if ($child_identifier !== null) { $resourcePath = str_replace( '{' . 'childIdentifier' . '}', - ObjectSerializer::toPathValue($childIdentifier), + ObjectSerializer::toPathValue($child_identifier), $resourcePath ); } @@ -2340,11 +2305,6 @@ protected function getChildAccountCreationStatusRequest($childIdentifier) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -2371,15 +2331,15 @@ protected function getChildAccountCreationStatusRequest($childIdentifier) * * Get all sender domains for a specific child account * - * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\GetChildDomains */ - public function getChildDomains($childIdentifier) + public function getChildDomains($child_identifier) { - list($response) = $this->getChildDomainsWithHttpInfo($childIdentifier); + list($response) = $this->getChildDomainsWithHttpInfo($child_identifier); return $response; } @@ -2388,16 +2348,16 @@ public function getChildDomains($childIdentifier) * * Get all sender domains for a specific child account * - * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\GetChildDomains, HTTP status code, HTTP response headers (array of strings) */ - public function getChildDomainsWithHttpInfo($childIdentifier) + public function getChildDomainsWithHttpInfo($child_identifier) { $returnType = '\SendinBlue\Client\Model\GetChildDomains'; - $request = $this->getChildDomainsRequest($childIdentifier); + $request = $this->getChildDomainsRequest($child_identifier); try { $options = $this->createHttpClientOption(); @@ -2453,7 +2413,7 @@ public function getChildDomainsWithHttpInfo($childIdentifier) ); $e->setResponseObject($data); break; - case 400: + case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -2461,7 +2421,7 @@ public function getChildDomainsWithHttpInfo($childIdentifier) ); $e->setResponseObject($data); break; - case 403: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -2469,7 +2429,7 @@ public function getChildDomainsWithHttpInfo($childIdentifier) ); $e->setResponseObject($data); break; - case 404: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -2487,14 +2447,14 @@ public function getChildDomainsWithHttpInfo($childIdentifier) * * Get all sender domains for a specific child account * - * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getChildDomainsAsync($childIdentifier) + public function getChildDomainsAsync($child_identifier) { - return $this->getChildDomainsAsyncWithHttpInfo($childIdentifier) + return $this->getChildDomainsAsyncWithHttpInfo($child_identifier) ->then( function ($response) { return $response[0]; @@ -2507,15 +2467,15 @@ function ($response) { * * Get all sender domains for a specific child account * - * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getChildDomainsAsyncWithHttpInfo($childIdentifier) + public function getChildDomainsAsyncWithHttpInfo($child_identifier) { $returnType = '\SendinBlue\Client\Model\GetChildDomains'; - $request = $this->getChildDomainsRequest($childIdentifier); + $request = $this->getChildDomainsRequest($child_identifier); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2557,17 +2517,17 @@ function ($exception) { /** * Create request for operation 'getChildDomains' * - * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getChildDomainsRequest($childIdentifier) + protected function getChildDomainsRequest($child_identifier) { - // verify the required parameter 'childIdentifier' is set - if ($childIdentifier === null || (is_array($childIdentifier) && count($childIdentifier) === 0)) { + // verify the required parameter 'child_identifier' is set + if ($child_identifier === null || (is_array($child_identifier) && count($child_identifier) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $childIdentifier when calling getChildDomains' + 'Missing the required parameter $child_identifier when calling getChildDomains' ); } @@ -2580,10 +2540,10 @@ protected function getChildDomainsRequest($childIdentifier) // path params - if ($childIdentifier !== null) { + if ($child_identifier !== null) { $resourcePath = str_replace( '{' . 'childIdentifier' . '}', - ObjectSerializer::toPathValue($childIdentifier), + ObjectSerializer::toPathValue($child_identifier), $resourcePath ); } @@ -2643,11 +2603,6 @@ protected function getChildDomainsRequest($childIdentifier) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -2674,15 +2629,15 @@ protected function getChildDomainsRequest($childIdentifier) * * Get a child account's details * - * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\GetChildInfo */ - public function getChildInfo($childIdentifier) + public function getChildInfo($child_identifier) { - list($response) = $this->getChildInfoWithHttpInfo($childIdentifier); + list($response) = $this->getChildInfoWithHttpInfo($child_identifier); return $response; } @@ -2691,16 +2646,16 @@ public function getChildInfo($childIdentifier) * * Get a child account's details * - * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\GetChildInfo, HTTP status code, HTTP response headers (array of strings) */ - public function getChildInfoWithHttpInfo($childIdentifier) + public function getChildInfoWithHttpInfo($child_identifier) { $returnType = '\SendinBlue\Client\Model\GetChildInfo'; - $request = $this->getChildInfoRequest($childIdentifier); + $request = $this->getChildInfoRequest($child_identifier); try { $options = $this->createHttpClientOption(); @@ -2756,7 +2711,7 @@ public function getChildInfoWithHttpInfo($childIdentifier) ); $e->setResponseObject($data); break; - case 400: + case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -2764,7 +2719,7 @@ public function getChildInfoWithHttpInfo($childIdentifier) ); $e->setResponseObject($data); break; - case 403: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -2772,7 +2727,7 @@ public function getChildInfoWithHttpInfo($childIdentifier) ); $e->setResponseObject($data); break; - case 404: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -2790,14 +2745,14 @@ public function getChildInfoWithHttpInfo($childIdentifier) * * Get a child account's details * - * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getChildInfoAsync($childIdentifier) + public function getChildInfoAsync($child_identifier) { - return $this->getChildInfoAsyncWithHttpInfo($childIdentifier) + return $this->getChildInfoAsyncWithHttpInfo($child_identifier) ->then( function ($response) { return $response[0]; @@ -2810,15 +2765,15 @@ function ($response) { * * Get a child account's details * - * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getChildInfoAsyncWithHttpInfo($childIdentifier) + public function getChildInfoAsyncWithHttpInfo($child_identifier) { $returnType = '\SendinBlue\Client\Model\GetChildInfo'; - $request = $this->getChildInfoRequest($childIdentifier); + $request = $this->getChildInfoRequest($child_identifier); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2860,17 +2815,17 @@ function ($exception) { /** * Create request for operation 'getChildInfo' * - * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getChildInfoRequest($childIdentifier) + protected function getChildInfoRequest($child_identifier) { - // verify the required parameter 'childIdentifier' is set - if ($childIdentifier === null || (is_array($childIdentifier) && count($childIdentifier) === 0)) { + // verify the required parameter 'child_identifier' is set + if ($child_identifier === null || (is_array($child_identifier) && count($child_identifier) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $childIdentifier when calling getChildInfo' + 'Missing the required parameter $child_identifier when calling getChildInfo' ); } @@ -2883,10 +2838,10 @@ protected function getChildInfoRequest($childIdentifier) // path params - if ($childIdentifier !== null) { + if ($child_identifier !== null) { $resourcePath = str_replace( '{' . 'childIdentifier' . '}', - ObjectSerializer::toPathValue($childIdentifier), + ObjectSerializer::toPathValue($child_identifier), $resourcePath ); } @@ -2946,11 +2901,6 @@ protected function getChildInfoRequest($childIdentifier) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -3236,11 +3186,6 @@ protected function getResellerChildsRequest($limit = '10', $offset = '0') if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -3267,15 +3212,15 @@ protected function getResellerChildsRequest($limit = '10', $offset = '0') * * Get session token to access Sendinblue (SSO) * - * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\GetSsoToken */ - public function getSsoToken($childIdentifier) + public function getSsoToken($child_identifier) { - list($response) = $this->getSsoTokenWithHttpInfo($childIdentifier); + list($response) = $this->getSsoTokenWithHttpInfo($child_identifier); return $response; } @@ -3284,16 +3229,16 @@ public function getSsoToken($childIdentifier) * * Get session token to access Sendinblue (SSO) * - * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\GetSsoToken, HTTP status code, HTTP response headers (array of strings) */ - public function getSsoTokenWithHttpInfo($childIdentifier) + public function getSsoTokenWithHttpInfo($child_identifier) { $returnType = '\SendinBlue\Client\Model\GetSsoToken'; - $request = $this->getSsoTokenRequest($childIdentifier); + $request = $this->getSsoTokenRequest($child_identifier); try { $options = $this->createHttpClientOption(); @@ -3349,7 +3294,7 @@ public function getSsoTokenWithHttpInfo($childIdentifier) ); $e->setResponseObject($data); break; - case 400: + case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -3357,7 +3302,7 @@ public function getSsoTokenWithHttpInfo($childIdentifier) ); $e->setResponseObject($data); break; - case 403: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -3365,7 +3310,7 @@ public function getSsoTokenWithHttpInfo($childIdentifier) ); $e->setResponseObject($data); break; - case 404: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -3383,14 +3328,14 @@ public function getSsoTokenWithHttpInfo($childIdentifier) * * Get session token to access Sendinblue (SSO) * - * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSsoTokenAsync($childIdentifier) + public function getSsoTokenAsync($child_identifier) { - return $this->getSsoTokenAsyncWithHttpInfo($childIdentifier) + return $this->getSsoTokenAsyncWithHttpInfo($child_identifier) ->then( function ($response) { return $response[0]; @@ -3403,15 +3348,15 @@ function ($response) { * * Get session token to access Sendinblue (SSO) * - * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSsoTokenAsyncWithHttpInfo($childIdentifier) + public function getSsoTokenAsyncWithHttpInfo($child_identifier) { $returnType = '\SendinBlue\Client\Model\GetSsoToken'; - $request = $this->getSsoTokenRequest($childIdentifier); + $request = $this->getSsoTokenRequest($child_identifier); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3453,17 +3398,17 @@ function ($exception) { /** * Create request for operation 'getSsoToken' * - * @param string $childIdentifier Either auth key or id of reseller's child (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getSsoTokenRequest($childIdentifier) + protected function getSsoTokenRequest($child_identifier) { - // verify the required parameter 'childIdentifier' is set - if ($childIdentifier === null || (is_array($childIdentifier) && count($childIdentifier) === 0)) { + // verify the required parameter 'child_identifier' is set + if ($child_identifier === null || (is_array($child_identifier) && count($child_identifier) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $childIdentifier when calling getSsoToken' + 'Missing the required parameter $child_identifier when calling getSsoToken' ); } @@ -3476,10 +3421,10 @@ protected function getSsoTokenRequest($childIdentifier) // path params - if ($childIdentifier !== null) { + if ($child_identifier !== null) { $resourcePath = str_replace( '{' . 'childIdentifier' . '}', - ObjectSerializer::toPathValue($childIdentifier), + ObjectSerializer::toPathValue($child_identifier), $resourcePath ); } @@ -3539,11 +3484,6 @@ protected function getSsoTokenRequest($childIdentifier) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -3570,16 +3510,16 @@ protected function getSsoTokenRequest($childIdentifier) * * Remove Email and/or SMS credits from a specific child account * - * @param string $childIdentifier Either auth key or id of reseller's child (required) - * @param \SendinBlue\Client\Model\RemoveCredits $removeCredits Values to post to remove email or SMS credits from a specific child account (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) + * @param \SendinBlue\Client\Model\RemoveCredits $remove_credits Values to post to remove email or SMS credits from a specific child account (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\RemainingCreditModel */ - public function removeCredits($childIdentifier, $removeCredits) + public function removeCredits($child_identifier, $remove_credits) { - list($response) = $this->removeCreditsWithHttpInfo($childIdentifier, $removeCredits); + list($response) = $this->removeCreditsWithHttpInfo($child_identifier, $remove_credits); return $response; } @@ -3588,17 +3528,17 @@ public function removeCredits($childIdentifier, $removeCredits) * * Remove Email and/or SMS credits from a specific child account * - * @param string $childIdentifier Either auth key or id of reseller's child (required) - * @param \SendinBlue\Client\Model\RemoveCredits $removeCredits Values to post to remove email or SMS credits from a specific child account (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) + * @param \SendinBlue\Client\Model\RemoveCredits $remove_credits Values to post to remove email or SMS credits from a specific child account (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\RemainingCreditModel, HTTP status code, HTTP response headers (array of strings) */ - public function removeCreditsWithHttpInfo($childIdentifier, $removeCredits) + public function removeCreditsWithHttpInfo($child_identifier, $remove_credits) { $returnType = '\SendinBlue\Client\Model\RemainingCreditModel'; - $request = $this->removeCreditsRequest($childIdentifier, $removeCredits); + $request = $this->removeCreditsRequest($child_identifier, $remove_credits); try { $options = $this->createHttpClientOption(); @@ -3662,7 +3602,7 @@ public function removeCreditsWithHttpInfo($childIdentifier, $removeCredits) ); $e->setResponseObject($data); break; - case 403: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -3670,7 +3610,7 @@ public function removeCreditsWithHttpInfo($childIdentifier, $removeCredits) ); $e->setResponseObject($data); break; - case 404: + case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -3688,15 +3628,15 @@ public function removeCreditsWithHttpInfo($childIdentifier, $removeCredits) * * Remove Email and/or SMS credits from a specific child account * - * @param string $childIdentifier Either auth key or id of reseller's child (required) - * @param \SendinBlue\Client\Model\RemoveCredits $removeCredits Values to post to remove email or SMS credits from a specific child account (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) + * @param \SendinBlue\Client\Model\RemoveCredits $remove_credits Values to post to remove email or SMS credits from a specific child account (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function removeCreditsAsync($childIdentifier, $removeCredits) + public function removeCreditsAsync($child_identifier, $remove_credits) { - return $this->removeCreditsAsyncWithHttpInfo($childIdentifier, $removeCredits) + return $this->removeCreditsAsyncWithHttpInfo($child_identifier, $remove_credits) ->then( function ($response) { return $response[0]; @@ -3709,16 +3649,16 @@ function ($response) { * * Remove Email and/or SMS credits from a specific child account * - * @param string $childIdentifier Either auth key or id of reseller's child (required) - * @param \SendinBlue\Client\Model\RemoveCredits $removeCredits Values to post to remove email or SMS credits from a specific child account (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) + * @param \SendinBlue\Client\Model\RemoveCredits $remove_credits Values to post to remove email or SMS credits from a specific child account (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function removeCreditsAsyncWithHttpInfo($childIdentifier, $removeCredits) + public function removeCreditsAsyncWithHttpInfo($child_identifier, $remove_credits) { $returnType = '\SendinBlue\Client\Model\RemainingCreditModel'; - $request = $this->removeCreditsRequest($childIdentifier, $removeCredits); + $request = $this->removeCreditsRequest($child_identifier, $remove_credits); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3760,24 +3700,24 @@ function ($exception) { /** * Create request for operation 'removeCredits' * - * @param string $childIdentifier Either auth key or id of reseller's child (required) - * @param \SendinBlue\Client\Model\RemoveCredits $removeCredits Values to post to remove email or SMS credits from a specific child account (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) + * @param \SendinBlue\Client\Model\RemoveCredits $remove_credits Values to post to remove email or SMS credits from a specific child account (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function removeCreditsRequest($childIdentifier, $removeCredits) + protected function removeCreditsRequest($child_identifier, $remove_credits) { - // verify the required parameter 'childIdentifier' is set - if ($childIdentifier === null || (is_array($childIdentifier) && count($childIdentifier) === 0)) { + // verify the required parameter 'child_identifier' is set + if ($child_identifier === null || (is_array($child_identifier) && count($child_identifier) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $childIdentifier when calling removeCredits' + 'Missing the required parameter $child_identifier when calling removeCredits' ); } - // verify the required parameter 'removeCredits' is set - if ($removeCredits === null || (is_array($removeCredits) && count($removeCredits) === 0)) { + // verify the required parameter 'remove_credits' is set + if ($remove_credits === null || (is_array($remove_credits) && count($remove_credits) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $removeCredits when calling removeCredits' + 'Missing the required parameter $remove_credits when calling removeCredits' ); } @@ -3790,18 +3730,18 @@ protected function removeCreditsRequest($childIdentifier, $removeCredits) // path params - if ($childIdentifier !== null) { + if ($child_identifier !== null) { $resourcePath = str_replace( '{' . 'childIdentifier' . '}', - ObjectSerializer::toPathValue($childIdentifier), + ObjectSerializer::toPathValue($child_identifier), $resourcePath ); } // body params $_tempBody = null; - if (isset($removeCredits)) { - $_tempBody = $removeCredits; + if (isset($remove_credits)) { + $_tempBody = $remove_credits; } if ($multipart) { @@ -3856,11 +3796,6 @@ protected function removeCreditsRequest($childIdentifier, $removeCredits) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -3885,36 +3820,36 @@ protected function removeCreditsRequest($childIdentifier, $removeCredits) /** * Operation updateChildAccountStatus * - * Update info of reseller's child account status based on the childIdentifier supplied + * Update info of reseller's child account status based on the identifier supplied * - * @param string $childIdentifier Either auth key or id of reseller's child (required) - * @param \SendinBlue\Client\Model\UpdateChildAccountStatus $updateChildAccountStatus values to update in child account status (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) + * @param \SendinBlue\Client\Model\UpdateChildAccountStatus $update_child_account_status values to update in child account status (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function updateChildAccountStatus($childIdentifier, $updateChildAccountStatus) + public function updateChildAccountStatus($child_identifier, $update_child_account_status) { - $this->updateChildAccountStatusWithHttpInfo($childIdentifier, $updateChildAccountStatus); + $this->updateChildAccountStatusWithHttpInfo($child_identifier, $update_child_account_status); } /** * Operation updateChildAccountStatusWithHttpInfo * - * Update info of reseller's child account status based on the childIdentifier supplied + * Update info of reseller's child account status based on the identifier supplied * - * @param string $childIdentifier Either auth key or id of reseller's child (required) - * @param \SendinBlue\Client\Model\UpdateChildAccountStatus $updateChildAccountStatus values to update in child account status (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) + * @param \SendinBlue\Client\Model\UpdateChildAccountStatus $update_child_account_status values to update in child account status (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function updateChildAccountStatusWithHttpInfo($childIdentifier, $updateChildAccountStatus) + public function updateChildAccountStatusWithHttpInfo($child_identifier, $update_child_account_status) { $returnType = ''; - $request = $this->updateChildAccountStatusRequest($childIdentifier, $updateChildAccountStatus); + $request = $this->updateChildAccountStatusRequest($child_identifier, $update_child_account_status); try { $options = $this->createHttpClientOption(); @@ -3948,7 +3883,7 @@ public function updateChildAccountStatusWithHttpInfo($childIdentifier, $updateCh } catch (ApiException $e) { switch ($e->getCode()) { - case 400: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -3956,7 +3891,7 @@ public function updateChildAccountStatusWithHttpInfo($childIdentifier, $updateCh ); $e->setResponseObject($data); break; - case 403: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -3964,7 +3899,7 @@ public function updateChildAccountStatusWithHttpInfo($childIdentifier, $updateCh ); $e->setResponseObject($data); break; - case 404: + case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -3980,17 +3915,17 @@ public function updateChildAccountStatusWithHttpInfo($childIdentifier, $updateCh /** * Operation updateChildAccountStatusAsync * - * Update info of reseller's child account status based on the childIdentifier supplied + * Update info of reseller's child account status based on the identifier supplied * - * @param string $childIdentifier Either auth key or id of reseller's child (required) - * @param \SendinBlue\Client\Model\UpdateChildAccountStatus $updateChildAccountStatus values to update in child account status (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) + * @param \SendinBlue\Client\Model\UpdateChildAccountStatus $update_child_account_status values to update in child account status (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateChildAccountStatusAsync($childIdentifier, $updateChildAccountStatus) + public function updateChildAccountStatusAsync($child_identifier, $update_child_account_status) { - return $this->updateChildAccountStatusAsyncWithHttpInfo($childIdentifier, $updateChildAccountStatus) + return $this->updateChildAccountStatusAsyncWithHttpInfo($child_identifier, $update_child_account_status) ->then( function ($response) { return $response[0]; @@ -4001,18 +3936,18 @@ function ($response) { /** * Operation updateChildAccountStatusAsyncWithHttpInfo * - * Update info of reseller's child account status based on the childIdentifier supplied + * Update info of reseller's child account status based on the identifier supplied * - * @param string $childIdentifier Either auth key or id of reseller's child (required) - * @param \SendinBlue\Client\Model\UpdateChildAccountStatus $updateChildAccountStatus values to update in child account status (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) + * @param \SendinBlue\Client\Model\UpdateChildAccountStatus $update_child_account_status values to update in child account status (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateChildAccountStatusAsyncWithHttpInfo($childIdentifier, $updateChildAccountStatus) + public function updateChildAccountStatusAsyncWithHttpInfo($child_identifier, $update_child_account_status) { $returnType = ''; - $request = $this->updateChildAccountStatusRequest($childIdentifier, $updateChildAccountStatus); + $request = $this->updateChildAccountStatusRequest($child_identifier, $update_child_account_status); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4040,24 +3975,24 @@ function ($exception) { /** * Create request for operation 'updateChildAccountStatus' * - * @param string $childIdentifier Either auth key or id of reseller's child (required) - * @param \SendinBlue\Client\Model\UpdateChildAccountStatus $updateChildAccountStatus values to update in child account status (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) + * @param \SendinBlue\Client\Model\UpdateChildAccountStatus $update_child_account_status values to update in child account status (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function updateChildAccountStatusRequest($childIdentifier, $updateChildAccountStatus) + protected function updateChildAccountStatusRequest($child_identifier, $update_child_account_status) { - // verify the required parameter 'childIdentifier' is set - if ($childIdentifier === null || (is_array($childIdentifier) && count($childIdentifier) === 0)) { + // verify the required parameter 'child_identifier' is set + if ($child_identifier === null || (is_array($child_identifier) && count($child_identifier) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $childIdentifier when calling updateChildAccountStatus' + 'Missing the required parameter $child_identifier when calling updateChildAccountStatus' ); } - // verify the required parameter 'updateChildAccountStatus' is set - if ($updateChildAccountStatus === null || (is_array($updateChildAccountStatus) && count($updateChildAccountStatus) === 0)) { + // verify the required parameter 'update_child_account_status' is set + if ($update_child_account_status === null || (is_array($update_child_account_status) && count($update_child_account_status) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $updateChildAccountStatus when calling updateChildAccountStatus' + 'Missing the required parameter $update_child_account_status when calling updateChildAccountStatus' ); } @@ -4070,18 +4005,18 @@ protected function updateChildAccountStatusRequest($childIdentifier, $updateChil // path params - if ($childIdentifier !== null) { + if ($child_identifier !== null) { $resourcePath = str_replace( '{' . 'childIdentifier' . '}', - ObjectSerializer::toPathValue($childIdentifier), + ObjectSerializer::toPathValue($child_identifier), $resourcePath ); } // body params $_tempBody = null; - if (isset($updateChildAccountStatus)) { - $_tempBody = $updateChildAccountStatus; + if (isset($update_child_account_status)) { + $_tempBody = $update_child_account_status; } if ($multipart) { @@ -4136,11 +4071,6 @@ protected function updateChildAccountStatusRequest($childIdentifier, $updateChil if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -4167,17 +4097,17 @@ protected function updateChildAccountStatusRequest($childIdentifier, $updateChil * * Update the sender domain of reseller's child based on the childIdentifier and domainName passed * - * @param string $childIdentifier Either auth key or id of reseller's child (required) - * @param string $domainName Pass the existing domain that needs to be updated (required) - * @param \SendinBlue\Client\Model\UpdateChildDomain $updateChildDomain value to update for sender domain (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) + * @param string $domain_name Pass the existing domain that needs to be updated (required) + * @param \SendinBlue\Client\Model\UpdateChildDomain $update_child_domain value to update for sender domain (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function updateChildDomain($childIdentifier, $domainName, $updateChildDomain) + public function updateChildDomain($child_identifier, $domain_name, $update_child_domain) { - $this->updateChildDomainWithHttpInfo($childIdentifier, $domainName, $updateChildDomain); + $this->updateChildDomainWithHttpInfo($child_identifier, $domain_name, $update_child_domain); } /** @@ -4185,18 +4115,18 @@ public function updateChildDomain($childIdentifier, $domainName, $updateChildDom * * Update the sender domain of reseller's child based on the childIdentifier and domainName passed * - * @param string $childIdentifier Either auth key or id of reseller's child (required) - * @param string $domainName Pass the existing domain that needs to be updated (required) - * @param \SendinBlue\Client\Model\UpdateChildDomain $updateChildDomain value to update for sender domain (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) + * @param string $domain_name Pass the existing domain that needs to be updated (required) + * @param \SendinBlue\Client\Model\UpdateChildDomain $update_child_domain value to update for sender domain (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function updateChildDomainWithHttpInfo($childIdentifier, $domainName, $updateChildDomain) + public function updateChildDomainWithHttpInfo($child_identifier, $domain_name, $update_child_domain) { $returnType = ''; - $request = $this->updateChildDomainRequest($childIdentifier, $domainName, $updateChildDomain); + $request = $this->updateChildDomainRequest($child_identifier, $domain_name, $update_child_domain); try { $options = $this->createHttpClientOption(); @@ -4230,7 +4160,7 @@ public function updateChildDomainWithHttpInfo($childIdentifier, $domainName, $up } catch (ApiException $e) { switch ($e->getCode()) { - case 400: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -4238,7 +4168,7 @@ public function updateChildDomainWithHttpInfo($childIdentifier, $domainName, $up ); $e->setResponseObject($data); break; - case 403: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -4246,7 +4176,7 @@ public function updateChildDomainWithHttpInfo($childIdentifier, $domainName, $up ); $e->setResponseObject($data); break; - case 404: + case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -4264,16 +4194,16 @@ public function updateChildDomainWithHttpInfo($childIdentifier, $domainName, $up * * Update the sender domain of reseller's child based on the childIdentifier and domainName passed * - * @param string $childIdentifier Either auth key or id of reseller's child (required) - * @param string $domainName Pass the existing domain that needs to be updated (required) - * @param \SendinBlue\Client\Model\UpdateChildDomain $updateChildDomain value to update for sender domain (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) + * @param string $domain_name Pass the existing domain that needs to be updated (required) + * @param \SendinBlue\Client\Model\UpdateChildDomain $update_child_domain value to update for sender domain (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateChildDomainAsync($childIdentifier, $domainName, $updateChildDomain) + public function updateChildDomainAsync($child_identifier, $domain_name, $update_child_domain) { - return $this->updateChildDomainAsyncWithHttpInfo($childIdentifier, $domainName, $updateChildDomain) + return $this->updateChildDomainAsyncWithHttpInfo($child_identifier, $domain_name, $update_child_domain) ->then( function ($response) { return $response[0]; @@ -4286,17 +4216,17 @@ function ($response) { * * Update the sender domain of reseller's child based on the childIdentifier and domainName passed * - * @param string $childIdentifier Either auth key or id of reseller's child (required) - * @param string $domainName Pass the existing domain that needs to be updated (required) - * @param \SendinBlue\Client\Model\UpdateChildDomain $updateChildDomain value to update for sender domain (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) + * @param string $domain_name Pass the existing domain that needs to be updated (required) + * @param \SendinBlue\Client\Model\UpdateChildDomain $update_child_domain value to update for sender domain (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateChildDomainAsyncWithHttpInfo($childIdentifier, $domainName, $updateChildDomain) + public function updateChildDomainAsyncWithHttpInfo($child_identifier, $domain_name, $update_child_domain) { $returnType = ''; - $request = $this->updateChildDomainRequest($childIdentifier, $domainName, $updateChildDomain); + $request = $this->updateChildDomainRequest($child_identifier, $domain_name, $update_child_domain); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4324,31 +4254,31 @@ function ($exception) { /** * Create request for operation 'updateChildDomain' * - * @param string $childIdentifier Either auth key or id of reseller's child (required) - * @param string $domainName Pass the existing domain that needs to be updated (required) - * @param \SendinBlue\Client\Model\UpdateChildDomain $updateChildDomain value to update for sender domain (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) + * @param string $domain_name Pass the existing domain that needs to be updated (required) + * @param \SendinBlue\Client\Model\UpdateChildDomain $update_child_domain value to update for sender domain (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function updateChildDomainRequest($childIdentifier, $domainName, $updateChildDomain) + protected function updateChildDomainRequest($child_identifier, $domain_name, $update_child_domain) { - // verify the required parameter 'childIdentifier' is set - if ($childIdentifier === null || (is_array($childIdentifier) && count($childIdentifier) === 0)) { + // verify the required parameter 'child_identifier' is set + if ($child_identifier === null || (is_array($child_identifier) && count($child_identifier) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $childIdentifier when calling updateChildDomain' + 'Missing the required parameter $child_identifier when calling updateChildDomain' ); } - // verify the required parameter 'domainName' is set - if ($domainName === null || (is_array($domainName) && count($domainName) === 0)) { + // verify the required parameter 'domain_name' is set + if ($domain_name === null || (is_array($domain_name) && count($domain_name) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $domainName when calling updateChildDomain' + 'Missing the required parameter $domain_name when calling updateChildDomain' ); } - // verify the required parameter 'updateChildDomain' is set - if ($updateChildDomain === null || (is_array($updateChildDomain) && count($updateChildDomain) === 0)) { + // verify the required parameter 'update_child_domain' is set + if ($update_child_domain === null || (is_array($update_child_domain) && count($update_child_domain) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $updateChildDomain when calling updateChildDomain' + 'Missing the required parameter $update_child_domain when calling updateChildDomain' ); } @@ -4361,26 +4291,26 @@ protected function updateChildDomainRequest($childIdentifier, $domainName, $upda // path params - if ($childIdentifier !== null) { + if ($child_identifier !== null) { $resourcePath = str_replace( '{' . 'childIdentifier' . '}', - ObjectSerializer::toPathValue($childIdentifier), + ObjectSerializer::toPathValue($child_identifier), $resourcePath ); } // path params - if ($domainName !== null) { + if ($domain_name !== null) { $resourcePath = str_replace( '{' . 'domainName' . '}', - ObjectSerializer::toPathValue($domainName), + ObjectSerializer::toPathValue($domain_name), $resourcePath ); } // body params $_tempBody = null; - if (isset($updateChildDomain)) { - $_tempBody = $updateChildDomain; + if (isset($update_child_domain)) { + $_tempBody = $update_child_domain; } if ($multipart) { @@ -4435,11 +4365,6 @@ protected function updateChildDomainRequest($childIdentifier, $domainName, $upda if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -4466,16 +4391,16 @@ protected function updateChildDomainRequest($childIdentifier, $domainName, $upda * * Update info of reseller's child based on the child identifier supplied * - * @param string $childIdentifier Either auth key or id of reseller's child (required) - * @param \SendinBlue\Client\Model\UpdateChild $resellerChild values to update in child profile (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) + * @param \SendinBlue\Client\Model\UpdateChild $reseller_child values to update in child profile (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function updateResellerChild($childIdentifier, $resellerChild) + public function updateResellerChild($child_identifier, $reseller_child) { - $this->updateResellerChildWithHttpInfo($childIdentifier, $resellerChild); + $this->updateResellerChildWithHttpInfo($child_identifier, $reseller_child); } /** @@ -4483,17 +4408,17 @@ public function updateResellerChild($childIdentifier, $resellerChild) * * Update info of reseller's child based on the child identifier supplied * - * @param string $childIdentifier Either auth key or id of reseller's child (required) - * @param \SendinBlue\Client\Model\UpdateChild $resellerChild values to update in child profile (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) + * @param \SendinBlue\Client\Model\UpdateChild $reseller_child values to update in child profile (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function updateResellerChildWithHttpInfo($childIdentifier, $resellerChild) + public function updateResellerChildWithHttpInfo($child_identifier, $reseller_child) { $returnType = ''; - $request = $this->updateResellerChildRequest($childIdentifier, $resellerChild); + $request = $this->updateResellerChildRequest($child_identifier, $reseller_child); try { $options = $this->createHttpClientOption(); @@ -4527,7 +4452,7 @@ public function updateResellerChildWithHttpInfo($childIdentifier, $resellerChild } catch (ApiException $e) { switch ($e->getCode()) { - case 400: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -4535,7 +4460,7 @@ public function updateResellerChildWithHttpInfo($childIdentifier, $resellerChild ); $e->setResponseObject($data); break; - case 403: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -4543,7 +4468,7 @@ public function updateResellerChildWithHttpInfo($childIdentifier, $resellerChild ); $e->setResponseObject($data); break; - case 404: + case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -4561,15 +4486,15 @@ public function updateResellerChildWithHttpInfo($childIdentifier, $resellerChild * * Update info of reseller's child based on the child identifier supplied * - * @param string $childIdentifier Either auth key or id of reseller's child (required) - * @param \SendinBlue\Client\Model\UpdateChild $resellerChild values to update in child profile (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) + * @param \SendinBlue\Client\Model\UpdateChild $reseller_child values to update in child profile (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateResellerChildAsync($childIdentifier, $resellerChild) + public function updateResellerChildAsync($child_identifier, $reseller_child) { - return $this->updateResellerChildAsyncWithHttpInfo($childIdentifier, $resellerChild) + return $this->updateResellerChildAsyncWithHttpInfo($child_identifier, $reseller_child) ->then( function ($response) { return $response[0]; @@ -4582,16 +4507,16 @@ function ($response) { * * Update info of reseller's child based on the child identifier supplied * - * @param string $childIdentifier Either auth key or id of reseller's child (required) - * @param \SendinBlue\Client\Model\UpdateChild $resellerChild values to update in child profile (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) + * @param \SendinBlue\Client\Model\UpdateChild $reseller_child values to update in child profile (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateResellerChildAsyncWithHttpInfo($childIdentifier, $resellerChild) + public function updateResellerChildAsyncWithHttpInfo($child_identifier, $reseller_child) { $returnType = ''; - $request = $this->updateResellerChildRequest($childIdentifier, $resellerChild); + $request = $this->updateResellerChildRequest($child_identifier, $reseller_child); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4619,24 +4544,24 @@ function ($exception) { /** * Create request for operation 'updateResellerChild' * - * @param string $childIdentifier Either auth key or id of reseller's child (required) - * @param \SendinBlue\Client\Model\UpdateChild $resellerChild values to update in child profile (required) + * @param string $child_identifier Either auth key or id of reseller's child (required) + * @param \SendinBlue\Client\Model\UpdateChild $reseller_child values to update in child profile (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function updateResellerChildRequest($childIdentifier, $resellerChild) + protected function updateResellerChildRequest($child_identifier, $reseller_child) { - // verify the required parameter 'childIdentifier' is set - if ($childIdentifier === null || (is_array($childIdentifier) && count($childIdentifier) === 0)) { + // verify the required parameter 'child_identifier' is set + if ($child_identifier === null || (is_array($child_identifier) && count($child_identifier) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $childIdentifier when calling updateResellerChild' + 'Missing the required parameter $child_identifier when calling updateResellerChild' ); } - // verify the required parameter 'resellerChild' is set - if ($resellerChild === null || (is_array($resellerChild) && count($resellerChild) === 0)) { + // verify the required parameter 'reseller_child' is set + if ($reseller_child === null || (is_array($reseller_child) && count($reseller_child) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $resellerChild when calling updateResellerChild' + 'Missing the required parameter $reseller_child when calling updateResellerChild' ); } @@ -4649,18 +4574,18 @@ protected function updateResellerChildRequest($childIdentifier, $resellerChild) // path params - if ($childIdentifier !== null) { + if ($child_identifier !== null) { $resourcePath = str_replace( '{' . 'childIdentifier' . '}', - ObjectSerializer::toPathValue($childIdentifier), + ObjectSerializer::toPathValue($child_identifier), $resourcePath ); } // body params $_tempBody = null; - if (isset($resellerChild)) { - $_tempBody = $resellerChild; + if (isset($reseller_child)) { + $_tempBody = $reseller_child; } if ($multipart) { @@ -4715,11 +4640,6 @@ protected function updateResellerChildRequest($childIdentifier, $resellerChild) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { diff --git a/lib/Api/SMSCampaignsApi.php b/lib/Api/SMSCampaignsApi.php index 982d25b5..30a8a548 100644 --- a/lib/Api/SMSCampaignsApi.php +++ b/lib/Api/SMSCampaignsApi.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -92,15 +92,15 @@ public function getConfig() * * Creates an SMS campaign * - * @param \SendinBlue\Client\Model\CreateSmsCampaign $createSmsCampaign Values to create an SMS Campaign (required) + * @param \SendinBlue\Client\Model\CreateSmsCampaign $create_sms_campaign Values to create an SMS Campaign (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\CreateModel */ - public function createSmsCampaign($createSmsCampaign) + public function createSmsCampaign($create_sms_campaign) { - list($response) = $this->createSmsCampaignWithHttpInfo($createSmsCampaign); + list($response) = $this->createSmsCampaignWithHttpInfo($create_sms_campaign); return $response; } @@ -109,16 +109,16 @@ public function createSmsCampaign($createSmsCampaign) * * Creates an SMS campaign * - * @param \SendinBlue\Client\Model\CreateSmsCampaign $createSmsCampaign Values to create an SMS Campaign (required) + * @param \SendinBlue\Client\Model\CreateSmsCampaign $create_sms_campaign Values to create an SMS Campaign (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\CreateModel, HTTP status code, HTTP response headers (array of strings) */ - public function createSmsCampaignWithHttpInfo($createSmsCampaign) + public function createSmsCampaignWithHttpInfo($create_sms_campaign) { $returnType = '\SendinBlue\Client\Model\CreateModel'; - $request = $this->createSmsCampaignRequest($createSmsCampaign); + $request = $this->createSmsCampaignRequest($create_sms_campaign); try { $options = $this->createHttpClientOption(); @@ -192,14 +192,14 @@ public function createSmsCampaignWithHttpInfo($createSmsCampaign) * * Creates an SMS campaign * - * @param \SendinBlue\Client\Model\CreateSmsCampaign $createSmsCampaign Values to create an SMS Campaign (required) + * @param \SendinBlue\Client\Model\CreateSmsCampaign $create_sms_campaign Values to create an SMS Campaign (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createSmsCampaignAsync($createSmsCampaign) + public function createSmsCampaignAsync($create_sms_campaign) { - return $this->createSmsCampaignAsyncWithHttpInfo($createSmsCampaign) + return $this->createSmsCampaignAsyncWithHttpInfo($create_sms_campaign) ->then( function ($response) { return $response[0]; @@ -212,15 +212,15 @@ function ($response) { * * Creates an SMS campaign * - * @param \SendinBlue\Client\Model\CreateSmsCampaign $createSmsCampaign Values to create an SMS Campaign (required) + * @param \SendinBlue\Client\Model\CreateSmsCampaign $create_sms_campaign Values to create an SMS Campaign (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createSmsCampaignAsyncWithHttpInfo($createSmsCampaign) + public function createSmsCampaignAsyncWithHttpInfo($create_sms_campaign) { $returnType = '\SendinBlue\Client\Model\CreateModel'; - $request = $this->createSmsCampaignRequest($createSmsCampaign); + $request = $this->createSmsCampaignRequest($create_sms_campaign); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -262,17 +262,17 @@ function ($exception) { /** * Create request for operation 'createSmsCampaign' * - * @param \SendinBlue\Client\Model\CreateSmsCampaign $createSmsCampaign Values to create an SMS Campaign (required) + * @param \SendinBlue\Client\Model\CreateSmsCampaign $create_sms_campaign Values to create an SMS Campaign (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function createSmsCampaignRequest($createSmsCampaign) + protected function createSmsCampaignRequest($create_sms_campaign) { - // verify the required parameter 'createSmsCampaign' is set - if ($createSmsCampaign === null || (is_array($createSmsCampaign) && count($createSmsCampaign) === 0)) { + // verify the required parameter 'create_sms_campaign' is set + if ($create_sms_campaign === null || (is_array($create_sms_campaign) && count($create_sms_campaign) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $createSmsCampaign when calling createSmsCampaign' + 'Missing the required parameter $create_sms_campaign when calling createSmsCampaign' ); } @@ -287,8 +287,8 @@ protected function createSmsCampaignRequest($createSmsCampaign) // body params $_tempBody = null; - if (isset($createSmsCampaign)) { - $_tempBody = $createSmsCampaign; + if (isset($create_sms_campaign)) { + $_tempBody = $create_sms_campaign; } if ($multipart) { @@ -343,11 +343,6 @@ protected function createSmsCampaignRequest($createSmsCampaign) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -374,15 +369,15 @@ protected function createSmsCampaignRequest($createSmsCampaign) * * Delete an SMS campaign * - * @param int $campaignId id of the SMS campaign (required) + * @param int $campaign_id id of the SMS campaign (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function deleteSmsCampaign($campaignId) + public function deleteSmsCampaign($campaign_id) { - $this->deleteSmsCampaignWithHttpInfo($campaignId); + $this->deleteSmsCampaignWithHttpInfo($campaign_id); } /** @@ -390,16 +385,16 @@ public function deleteSmsCampaign($campaignId) * * Delete an SMS campaign * - * @param int $campaignId id of the SMS campaign (required) + * @param int $campaign_id id of the SMS campaign (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteSmsCampaignWithHttpInfo($campaignId) + public function deleteSmsCampaignWithHttpInfo($campaign_id) { $returnType = ''; - $request = $this->deleteSmsCampaignRequest($campaignId); + $request = $this->deleteSmsCampaignRequest($campaign_id); try { $options = $this->createHttpClientOption(); @@ -433,7 +428,7 @@ public function deleteSmsCampaignWithHttpInfo($campaignId) } catch (ApiException $e) { switch ($e->getCode()) { - case 400: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -441,7 +436,7 @@ public function deleteSmsCampaignWithHttpInfo($campaignId) ); $e->setResponseObject($data); break; - case 404: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -459,14 +454,14 @@ public function deleteSmsCampaignWithHttpInfo($campaignId) * * Delete an SMS campaign * - * @param int $campaignId id of the SMS campaign (required) + * @param int $campaign_id id of the SMS campaign (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteSmsCampaignAsync($campaignId) + public function deleteSmsCampaignAsync($campaign_id) { - return $this->deleteSmsCampaignAsyncWithHttpInfo($campaignId) + return $this->deleteSmsCampaignAsyncWithHttpInfo($campaign_id) ->then( function ($response) { return $response[0]; @@ -479,15 +474,15 @@ function ($response) { * * Delete an SMS campaign * - * @param int $campaignId id of the SMS campaign (required) + * @param int $campaign_id id of the SMS campaign (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteSmsCampaignAsyncWithHttpInfo($campaignId) + public function deleteSmsCampaignAsyncWithHttpInfo($campaign_id) { $returnType = ''; - $request = $this->deleteSmsCampaignRequest($campaignId); + $request = $this->deleteSmsCampaignRequest($campaign_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -515,17 +510,17 @@ function ($exception) { /** * Create request for operation 'deleteSmsCampaign' * - * @param int $campaignId id of the SMS campaign (required) + * @param int $campaign_id id of the SMS campaign (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function deleteSmsCampaignRequest($campaignId) + protected function deleteSmsCampaignRequest($campaign_id) { - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + // verify the required parameter 'campaign_id' is set + if ($campaign_id === null || (is_array($campaign_id) && count($campaign_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling deleteSmsCampaign' + 'Missing the required parameter $campaign_id when calling deleteSmsCampaign' ); } @@ -538,10 +533,10 @@ protected function deleteSmsCampaignRequest($campaignId) // path params - if ($campaignId !== null) { + if ($campaign_id !== null) { $resourcePath = str_replace( '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), + ObjectSerializer::toPathValue($campaign_id), $resourcePath ); } @@ -601,11 +596,6 @@ protected function deleteSmsCampaignRequest($campaignId) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -632,15 +622,15 @@ protected function deleteSmsCampaignRequest($campaignId) * * Get an SMS campaign * - * @param int $campaignId id of the SMS campaign (required) + * @param int $campaign_id id of the SMS campaign (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\GetSmsCampaign */ - public function getSmsCampaign($campaignId) + public function getSmsCampaign($campaign_id) { - list($response) = $this->getSmsCampaignWithHttpInfo($campaignId); + list($response) = $this->getSmsCampaignWithHttpInfo($campaign_id); return $response; } @@ -649,16 +639,16 @@ public function getSmsCampaign($campaignId) * * Get an SMS campaign * - * @param int $campaignId id of the SMS campaign (required) + * @param int $campaign_id id of the SMS campaign (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\GetSmsCampaign, HTTP status code, HTTP response headers (array of strings) */ - public function getSmsCampaignWithHttpInfo($campaignId) + public function getSmsCampaignWithHttpInfo($campaign_id) { $returnType = '\SendinBlue\Client\Model\GetSmsCampaign'; - $request = $this->getSmsCampaignRequest($campaignId); + $request = $this->getSmsCampaignRequest($campaign_id); try { $options = $this->createHttpClientOption(); @@ -740,14 +730,14 @@ public function getSmsCampaignWithHttpInfo($campaignId) * * Get an SMS campaign * - * @param int $campaignId id of the SMS campaign (required) + * @param int $campaign_id id of the SMS campaign (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSmsCampaignAsync($campaignId) + public function getSmsCampaignAsync($campaign_id) { - return $this->getSmsCampaignAsyncWithHttpInfo($campaignId) + return $this->getSmsCampaignAsyncWithHttpInfo($campaign_id) ->then( function ($response) { return $response[0]; @@ -760,15 +750,15 @@ function ($response) { * * Get an SMS campaign * - * @param int $campaignId id of the SMS campaign (required) + * @param int $campaign_id id of the SMS campaign (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSmsCampaignAsyncWithHttpInfo($campaignId) + public function getSmsCampaignAsyncWithHttpInfo($campaign_id) { $returnType = '\SendinBlue\Client\Model\GetSmsCampaign'; - $request = $this->getSmsCampaignRequest($campaignId); + $request = $this->getSmsCampaignRequest($campaign_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -810,17 +800,17 @@ function ($exception) { /** * Create request for operation 'getSmsCampaign' * - * @param int $campaignId id of the SMS campaign (required) + * @param int $campaign_id id of the SMS campaign (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getSmsCampaignRequest($campaignId) + protected function getSmsCampaignRequest($campaign_id) { - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + // verify the required parameter 'campaign_id' is set + if ($campaign_id === null || (is_array($campaign_id) && count($campaign_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling getSmsCampaign' + 'Missing the required parameter $campaign_id when calling getSmsCampaign' ); } @@ -833,10 +823,10 @@ protected function getSmsCampaignRequest($campaignId) // path params - if ($campaignId !== null) { + if ($campaign_id !== null) { $resourcePath = str_replace( '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), + ObjectSerializer::toPathValue($campaign_id), $resourcePath ); } @@ -896,11 +886,6 @@ protected function getSmsCampaignRequest($campaignId) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -928,19 +913,18 @@ protected function getSmsCampaignRequest($campaignId) * Returns the information for all your created SMS campaigns * * @param string $status Status of campaign. (optional) - * @param string $startDate Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) - * @param string $endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param \DateTime $start_date Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param \DateTime $end_date Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) * @param int $limit Number limitation for the result returned (optional, default to 500) * @param int $offset Beginning point in the list to retrieve from. (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\GetSmsCampaigns */ - public function getSmsCampaigns($status = null, $startDate = null, $endDate = null, $limit = '500', $offset = '0', $sort = 'desc') + public function getSmsCampaigns($status = null, $start_date = null, $end_date = null, $limit = '500', $offset = '0') { - list($response) = $this->getSmsCampaignsWithHttpInfo($status, $startDate, $endDate, $limit, $offset, $sort); + list($response) = $this->getSmsCampaignsWithHttpInfo($status, $start_date, $end_date, $limit, $offset); return $response; } @@ -950,20 +934,19 @@ public function getSmsCampaigns($status = null, $startDate = null, $endDate = nu * Returns the information for all your created SMS campaigns * * @param string $status Status of campaign. (optional) - * @param string $startDate Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) - * @param string $endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param \DateTime $start_date Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param \DateTime $end_date Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) * @param int $limit Number limitation for the result returned (optional, default to 500) * @param int $offset Beginning point in the list to retrieve from. (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\GetSmsCampaigns, HTTP status code, HTTP response headers (array of strings) */ - public function getSmsCampaignsWithHttpInfo($status = null, $startDate = null, $endDate = null, $limit = '500', $offset = '0', $sort = 'desc') + public function getSmsCampaignsWithHttpInfo($status = null, $start_date = null, $end_date = null, $limit = '500', $offset = '0') { $returnType = '\SendinBlue\Client\Model\GetSmsCampaigns'; - $request = $this->getSmsCampaignsRequest($status, $startDate, $endDate, $limit, $offset, $sort); + $request = $this->getSmsCampaignsRequest($status, $start_date, $end_date, $limit, $offset); try { $options = $this->createHttpClientOption(); @@ -1038,18 +1021,17 @@ public function getSmsCampaignsWithHttpInfo($status = null, $startDate = null, $ * Returns the information for all your created SMS campaigns * * @param string $status Status of campaign. (optional) - * @param string $startDate Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) - * @param string $endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param \DateTime $start_date Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param \DateTime $end_date Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) * @param int $limit Number limitation for the result returned (optional, default to 500) * @param int $offset Beginning point in the list to retrieve from. (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSmsCampaignsAsync($status = null, $startDate = null, $endDate = null, $limit = '500', $offset = '0', $sort = 'desc') + public function getSmsCampaignsAsync($status = null, $start_date = null, $end_date = null, $limit = '500', $offset = '0') { - return $this->getSmsCampaignsAsyncWithHttpInfo($status, $startDate, $endDate, $limit, $offset, $sort) + return $this->getSmsCampaignsAsyncWithHttpInfo($status, $start_date, $end_date, $limit, $offset) ->then( function ($response) { return $response[0]; @@ -1063,19 +1045,18 @@ function ($response) { * Returns the information for all your created SMS campaigns * * @param string $status Status of campaign. (optional) - * @param string $startDate Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) - * @param string $endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param \DateTime $start_date Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param \DateTime $end_date Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) * @param int $limit Number limitation for the result returned (optional, default to 500) * @param int $offset Beginning point in the list to retrieve from. (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSmsCampaignsAsyncWithHttpInfo($status = null, $startDate = null, $endDate = null, $limit = '500', $offset = '0', $sort = 'desc') + public function getSmsCampaignsAsyncWithHttpInfo($status = null, $start_date = null, $end_date = null, $limit = '500', $offset = '0') { $returnType = '\SendinBlue\Client\Model\GetSmsCampaigns'; - $request = $this->getSmsCampaignsRequest($status, $startDate, $endDate, $limit, $offset, $sort); + $request = $this->getSmsCampaignsRequest($status, $start_date, $end_date, $limit, $offset); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1118,16 +1099,15 @@ function ($exception) { * Create request for operation 'getSmsCampaigns' * * @param string $status Status of campaign. (optional) - * @param string $startDate Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) - * @param string $endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param \DateTime $start_date Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param \DateTime $end_date Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) * @param int $limit Number limitation for the result returned (optional, default to 500) * @param int $offset Beginning point in the list to retrieve from. (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getSmsCampaignsRequest($status = null, $startDate = null, $endDate = null, $limit = '500', $offset = '0', $sort = 'desc') + protected function getSmsCampaignsRequest($status = null, $start_date = null, $end_date = null, $limit = '500', $offset = '0') { if ($limit !== null && $limit > 1000) { throw new \InvalidArgumentException('invalid value for "$limit" when calling SMSCampaignsApi.getSmsCampaigns, must be smaller than or equal to 1000.'); @@ -1146,12 +1126,12 @@ protected function getSmsCampaignsRequest($status = null, $startDate = null, $en $queryParams['status'] = ObjectSerializer::toQueryValue($status); } // query params - if ($startDate !== null) { - $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); + if ($start_date !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($start_date); } // query params - if ($endDate !== null) { - $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); + if ($end_date !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($end_date); } // query params if ($limit !== null) { @@ -1161,10 +1141,6 @@ protected function getSmsCampaignsRequest($status = null, $startDate = null, $en if ($offset !== null) { $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); } - // query params - if ($sort !== null) { - $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); - } // body params @@ -1222,11 +1198,6 @@ protected function getSmsCampaignsRequest($status = null, $startDate = null, $en if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1253,16 +1224,16 @@ protected function getSmsCampaignsRequest($status = null, $startDate = null, $en * * Export an SMS campaign's recipients * - * @param int $campaignId id of the campaign (required) - * @param \SendinBlue\Client\Model\RequestSmsRecipientExport $recipientExport Values to send for a recipient export request (optional) + * @param int $campaign_id id of the campaign (required) + * @param \SendinBlue\Client\Model\RequestSmsRecipientExport $recipient_export Values to send for a recipient export request (optional) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\CreatedProcessId */ - public function requestSmsRecipientExport($campaignId, $recipientExport = null) + public function requestSmsRecipientExport($campaign_id, $recipient_export = null) { - list($response) = $this->requestSmsRecipientExportWithHttpInfo($campaignId, $recipientExport); + list($response) = $this->requestSmsRecipientExportWithHttpInfo($campaign_id, $recipient_export); return $response; } @@ -1271,17 +1242,17 @@ public function requestSmsRecipientExport($campaignId, $recipientExport = null) * * Export an SMS campaign's recipients * - * @param int $campaignId id of the campaign (required) - * @param \SendinBlue\Client\Model\RequestSmsRecipientExport $recipientExport Values to send for a recipient export request (optional) + * @param int $campaign_id id of the campaign (required) + * @param \SendinBlue\Client\Model\RequestSmsRecipientExport $recipient_export Values to send for a recipient export request (optional) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\CreatedProcessId, HTTP status code, HTTP response headers (array of strings) */ - public function requestSmsRecipientExportWithHttpInfo($campaignId, $recipientExport = null) + public function requestSmsRecipientExportWithHttpInfo($campaign_id, $recipient_export = null) { $returnType = '\SendinBlue\Client\Model\CreatedProcessId'; - $request = $this->requestSmsRecipientExportRequest($campaignId, $recipientExport); + $request = $this->requestSmsRecipientExportRequest($campaign_id, $recipient_export); try { $options = $this->createHttpClientOption(); @@ -1363,15 +1334,15 @@ public function requestSmsRecipientExportWithHttpInfo($campaignId, $recipientExp * * Export an SMS campaign's recipients * - * @param int $campaignId id of the campaign (required) - * @param \SendinBlue\Client\Model\RequestSmsRecipientExport $recipientExport Values to send for a recipient export request (optional) + * @param int $campaign_id id of the campaign (required) + * @param \SendinBlue\Client\Model\RequestSmsRecipientExport $recipient_export Values to send for a recipient export request (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function requestSmsRecipientExportAsync($campaignId, $recipientExport = null) + public function requestSmsRecipientExportAsync($campaign_id, $recipient_export = null) { - return $this->requestSmsRecipientExportAsyncWithHttpInfo($campaignId, $recipientExport) + return $this->requestSmsRecipientExportAsyncWithHttpInfo($campaign_id, $recipient_export) ->then( function ($response) { return $response[0]; @@ -1384,16 +1355,16 @@ function ($response) { * * Export an SMS campaign's recipients * - * @param int $campaignId id of the campaign (required) - * @param \SendinBlue\Client\Model\RequestSmsRecipientExport $recipientExport Values to send for a recipient export request (optional) + * @param int $campaign_id id of the campaign (required) + * @param \SendinBlue\Client\Model\RequestSmsRecipientExport $recipient_export Values to send for a recipient export request (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function requestSmsRecipientExportAsyncWithHttpInfo($campaignId, $recipientExport = null) + public function requestSmsRecipientExportAsyncWithHttpInfo($campaign_id, $recipient_export = null) { $returnType = '\SendinBlue\Client\Model\CreatedProcessId'; - $request = $this->requestSmsRecipientExportRequest($campaignId, $recipientExport); + $request = $this->requestSmsRecipientExportRequest($campaign_id, $recipient_export); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1435,18 +1406,18 @@ function ($exception) { /** * Create request for operation 'requestSmsRecipientExport' * - * @param int $campaignId id of the campaign (required) - * @param \SendinBlue\Client\Model\RequestSmsRecipientExport $recipientExport Values to send for a recipient export request (optional) + * @param int $campaign_id id of the campaign (required) + * @param \SendinBlue\Client\Model\RequestSmsRecipientExport $recipient_export Values to send for a recipient export request (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function requestSmsRecipientExportRequest($campaignId, $recipientExport = null) + protected function requestSmsRecipientExportRequest($campaign_id, $recipient_export = null) { - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + // verify the required parameter 'campaign_id' is set + if ($campaign_id === null || (is_array($campaign_id) && count($campaign_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling requestSmsRecipientExport' + 'Missing the required parameter $campaign_id when calling requestSmsRecipientExport' ); } @@ -1459,18 +1430,18 @@ protected function requestSmsRecipientExportRequest($campaignId, $recipientExpor // path params - if ($campaignId !== null) { + if ($campaign_id !== null) { $resourcePath = str_replace( '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), + ObjectSerializer::toPathValue($campaign_id), $resourcePath ); } // body params $_tempBody = null; - if (isset($recipientExport)) { - $_tempBody = $recipientExport; + if (isset($recipient_export)) { + $_tempBody = $recipient_export; } if ($multipart) { @@ -1525,11 +1496,6 @@ protected function requestSmsRecipientExportRequest($campaignId, $recipientExpor if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1556,15 +1522,15 @@ protected function requestSmsRecipientExportRequest($campaignId, $recipientExpor * * Send your SMS campaign immediately * - * @param int $campaignId id of the campaign (required) + * @param int $campaign_id id of the campaign (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function sendSmsCampaignNow($campaignId) + public function sendSmsCampaignNow($campaign_id) { - $this->sendSmsCampaignNowWithHttpInfo($campaignId); + $this->sendSmsCampaignNowWithHttpInfo($campaign_id); } /** @@ -1572,16 +1538,16 @@ public function sendSmsCampaignNow($campaignId) * * Send your SMS campaign immediately * - * @param int $campaignId id of the campaign (required) + * @param int $campaign_id id of the campaign (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function sendSmsCampaignNowWithHttpInfo($campaignId) + public function sendSmsCampaignNowWithHttpInfo($campaign_id) { $returnType = ''; - $request = $this->sendSmsCampaignNowRequest($campaignId); + $request = $this->sendSmsCampaignNowRequest($campaign_id); try { $options = $this->createHttpClientOption(); @@ -1649,14 +1615,14 @@ public function sendSmsCampaignNowWithHttpInfo($campaignId) * * Send your SMS campaign immediately * - * @param int $campaignId id of the campaign (required) + * @param int $campaign_id id of the campaign (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function sendSmsCampaignNowAsync($campaignId) + public function sendSmsCampaignNowAsync($campaign_id) { - return $this->sendSmsCampaignNowAsyncWithHttpInfo($campaignId) + return $this->sendSmsCampaignNowAsyncWithHttpInfo($campaign_id) ->then( function ($response) { return $response[0]; @@ -1669,15 +1635,15 @@ function ($response) { * * Send your SMS campaign immediately * - * @param int $campaignId id of the campaign (required) + * @param int $campaign_id id of the campaign (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function sendSmsCampaignNowAsyncWithHttpInfo($campaignId) + public function sendSmsCampaignNowAsyncWithHttpInfo($campaign_id) { $returnType = ''; - $request = $this->sendSmsCampaignNowRequest($campaignId); + $request = $this->sendSmsCampaignNowRequest($campaign_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1705,17 +1671,17 @@ function ($exception) { /** * Create request for operation 'sendSmsCampaignNow' * - * @param int $campaignId id of the campaign (required) + * @param int $campaign_id id of the campaign (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function sendSmsCampaignNowRequest($campaignId) + protected function sendSmsCampaignNowRequest($campaign_id) { - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + // verify the required parameter 'campaign_id' is set + if ($campaign_id === null || (is_array($campaign_id) && count($campaign_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling sendSmsCampaignNow' + 'Missing the required parameter $campaign_id when calling sendSmsCampaignNow' ); } @@ -1728,10 +1694,10 @@ protected function sendSmsCampaignNowRequest($campaignId) // path params - if ($campaignId !== null) { + if ($campaign_id !== null) { $resourcePath = str_replace( '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), + ObjectSerializer::toPathValue($campaign_id), $resourcePath ); } @@ -1791,11 +1757,6 @@ protected function sendSmsCampaignNowRequest($campaignId) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1822,16 +1783,16 @@ protected function sendSmsCampaignNowRequest($campaignId) * * Send an SMS campaign's report * - * @param int $campaignId id of the campaign (required) - * @param \SendinBlue\Client\Model\SendReport $sendReport Values for send a report (required) + * @param int $campaign_id id of the campaign (required) + * @param \SendinBlue\Client\Model\SendReport $send_report Values for send a report (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function sendSmsReport($campaignId, $sendReport) + public function sendSmsReport($campaign_id, $send_report) { - $this->sendSmsReportWithHttpInfo($campaignId, $sendReport); + $this->sendSmsReportWithHttpInfo($campaign_id, $send_report); } /** @@ -1839,17 +1800,17 @@ public function sendSmsReport($campaignId, $sendReport) * * Send an SMS campaign's report * - * @param int $campaignId id of the campaign (required) - * @param \SendinBlue\Client\Model\SendReport $sendReport Values for send a report (required) + * @param int $campaign_id id of the campaign (required) + * @param \SendinBlue\Client\Model\SendReport $send_report Values for send a report (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function sendSmsReportWithHttpInfo($campaignId, $sendReport) + public function sendSmsReportWithHttpInfo($campaign_id, $send_report) { $returnType = ''; - $request = $this->sendSmsReportRequest($campaignId, $sendReport); + $request = $this->sendSmsReportRequest($campaign_id, $send_report); try { $options = $this->createHttpClientOption(); @@ -1909,15 +1870,15 @@ public function sendSmsReportWithHttpInfo($campaignId, $sendReport) * * Send an SMS campaign's report * - * @param int $campaignId id of the campaign (required) - * @param \SendinBlue\Client\Model\SendReport $sendReport Values for send a report (required) + * @param int $campaign_id id of the campaign (required) + * @param \SendinBlue\Client\Model\SendReport $send_report Values for send a report (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function sendSmsReportAsync($campaignId, $sendReport) + public function sendSmsReportAsync($campaign_id, $send_report) { - return $this->sendSmsReportAsyncWithHttpInfo($campaignId, $sendReport) + return $this->sendSmsReportAsyncWithHttpInfo($campaign_id, $send_report) ->then( function ($response) { return $response[0]; @@ -1930,16 +1891,16 @@ function ($response) { * * Send an SMS campaign's report * - * @param int $campaignId id of the campaign (required) - * @param \SendinBlue\Client\Model\SendReport $sendReport Values for send a report (required) + * @param int $campaign_id id of the campaign (required) + * @param \SendinBlue\Client\Model\SendReport $send_report Values for send a report (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function sendSmsReportAsyncWithHttpInfo($campaignId, $sendReport) + public function sendSmsReportAsyncWithHttpInfo($campaign_id, $send_report) { $returnType = ''; - $request = $this->sendSmsReportRequest($campaignId, $sendReport); + $request = $this->sendSmsReportRequest($campaign_id, $send_report); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1967,24 +1928,24 @@ function ($exception) { /** * Create request for operation 'sendSmsReport' * - * @param int $campaignId id of the campaign (required) - * @param \SendinBlue\Client\Model\SendReport $sendReport Values for send a report (required) + * @param int $campaign_id id of the campaign (required) + * @param \SendinBlue\Client\Model\SendReport $send_report Values for send a report (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function sendSmsReportRequest($campaignId, $sendReport) + protected function sendSmsReportRequest($campaign_id, $send_report) { - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + // verify the required parameter 'campaign_id' is set + if ($campaign_id === null || (is_array($campaign_id) && count($campaign_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling sendSmsReport' + 'Missing the required parameter $campaign_id when calling sendSmsReport' ); } - // verify the required parameter 'sendReport' is set - if ($sendReport === null || (is_array($sendReport) && count($sendReport) === 0)) { + // verify the required parameter 'send_report' is set + if ($send_report === null || (is_array($send_report) && count($send_report) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $sendReport when calling sendSmsReport' + 'Missing the required parameter $send_report when calling sendSmsReport' ); } @@ -1997,18 +1958,18 @@ protected function sendSmsReportRequest($campaignId, $sendReport) // path params - if ($campaignId !== null) { + if ($campaign_id !== null) { $resourcePath = str_replace( '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), + ObjectSerializer::toPathValue($campaign_id), $resourcePath ); } // body params $_tempBody = null; - if (isset($sendReport)) { - $_tempBody = $sendReport; + if (isset($send_report)) { + $_tempBody = $send_report; } if ($multipart) { @@ -2063,11 +2024,6 @@ protected function sendSmsReportRequest($campaignId, $sendReport) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -2094,16 +2050,16 @@ protected function sendSmsReportRequest($campaignId, $sendReport) * * Send a test SMS campaign * - * @param int $campaignId Id of the SMS campaign (required) - * @param \SendinBlue\Client\Model\SendTestSms $phoneNumber Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted (required) + * @param int $campaign_id Id of the SMS campaign (required) + * @param \SendinBlue\Client\Model\SendTestSms $phone_number Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function sendTestSms($campaignId, $phoneNumber) + public function sendTestSms($campaign_id, $phone_number) { - $this->sendTestSmsWithHttpInfo($campaignId, $phoneNumber); + $this->sendTestSmsWithHttpInfo($campaign_id, $phone_number); } /** @@ -2111,17 +2067,17 @@ public function sendTestSms($campaignId, $phoneNumber) * * Send a test SMS campaign * - * @param int $campaignId Id of the SMS campaign (required) - * @param \SendinBlue\Client\Model\SendTestSms $phoneNumber Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted (required) + * @param int $campaign_id Id of the SMS campaign (required) + * @param \SendinBlue\Client\Model\SendTestSms $phone_number Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function sendTestSmsWithHttpInfo($campaignId, $phoneNumber) + public function sendTestSmsWithHttpInfo($campaign_id, $phone_number) { $returnType = ''; - $request = $this->sendTestSmsRequest($campaignId, $phoneNumber); + $request = $this->sendTestSmsRequest($campaign_id, $phone_number); try { $options = $this->createHttpClientOption(); @@ -2181,15 +2137,15 @@ public function sendTestSmsWithHttpInfo($campaignId, $phoneNumber) * * Send a test SMS campaign * - * @param int $campaignId Id of the SMS campaign (required) - * @param \SendinBlue\Client\Model\SendTestSms $phoneNumber Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted (required) + * @param int $campaign_id Id of the SMS campaign (required) + * @param \SendinBlue\Client\Model\SendTestSms $phone_number Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function sendTestSmsAsync($campaignId, $phoneNumber) + public function sendTestSmsAsync($campaign_id, $phone_number) { - return $this->sendTestSmsAsyncWithHttpInfo($campaignId, $phoneNumber) + return $this->sendTestSmsAsyncWithHttpInfo($campaign_id, $phone_number) ->then( function ($response) { return $response[0]; @@ -2202,16 +2158,16 @@ function ($response) { * * Send a test SMS campaign * - * @param int $campaignId Id of the SMS campaign (required) - * @param \SendinBlue\Client\Model\SendTestSms $phoneNumber Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted (required) + * @param int $campaign_id Id of the SMS campaign (required) + * @param \SendinBlue\Client\Model\SendTestSms $phone_number Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function sendTestSmsAsyncWithHttpInfo($campaignId, $phoneNumber) + public function sendTestSmsAsyncWithHttpInfo($campaign_id, $phone_number) { $returnType = ''; - $request = $this->sendTestSmsRequest($campaignId, $phoneNumber); + $request = $this->sendTestSmsRequest($campaign_id, $phone_number); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2239,24 +2195,24 @@ function ($exception) { /** * Create request for operation 'sendTestSms' * - * @param int $campaignId Id of the SMS campaign (required) - * @param \SendinBlue\Client\Model\SendTestSms $phoneNumber Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted (required) + * @param int $campaign_id Id of the SMS campaign (required) + * @param \SendinBlue\Client\Model\SendTestSms $phone_number Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function sendTestSmsRequest($campaignId, $phoneNumber) + protected function sendTestSmsRequest($campaign_id, $phone_number) { - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + // verify the required parameter 'campaign_id' is set + if ($campaign_id === null || (is_array($campaign_id) && count($campaign_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling sendTestSms' + 'Missing the required parameter $campaign_id when calling sendTestSms' ); } - // verify the required parameter 'phoneNumber' is set - if ($phoneNumber === null || (is_array($phoneNumber) && count($phoneNumber) === 0)) { + // verify the required parameter 'phone_number' is set + if ($phone_number === null || (is_array($phone_number) && count($phone_number) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $phoneNumber when calling sendTestSms' + 'Missing the required parameter $phone_number when calling sendTestSms' ); } @@ -2269,18 +2225,18 @@ protected function sendTestSmsRequest($campaignId, $phoneNumber) // path params - if ($campaignId !== null) { + if ($campaign_id !== null) { $resourcePath = str_replace( '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), + ObjectSerializer::toPathValue($campaign_id), $resourcePath ); } // body params $_tempBody = null; - if (isset($phoneNumber)) { - $_tempBody = $phoneNumber; + if (isset($phone_number)) { + $_tempBody = $phone_number; } if ($multipart) { @@ -2335,11 +2291,6 @@ protected function sendTestSmsRequest($campaignId, $phoneNumber) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -2366,16 +2317,16 @@ protected function sendTestSmsRequest($campaignId, $phoneNumber) * * Update an SMS campaign * - * @param int $campaignId id of the SMS campaign (required) - * @param \SendinBlue\Client\Model\UpdateSmsCampaign $updateSmsCampaign Values to update an SMS Campaign (required) + * @param int $campaign_id id of the SMS campaign (required) + * @param \SendinBlue\Client\Model\UpdateSmsCampaign $update_sms_campaign Values to update an SMS Campaign (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function updateSmsCampaign($campaignId, $updateSmsCampaign) + public function updateSmsCampaign($campaign_id, $update_sms_campaign) { - $this->updateSmsCampaignWithHttpInfo($campaignId, $updateSmsCampaign); + $this->updateSmsCampaignWithHttpInfo($campaign_id, $update_sms_campaign); } /** @@ -2383,17 +2334,17 @@ public function updateSmsCampaign($campaignId, $updateSmsCampaign) * * Update an SMS campaign * - * @param int $campaignId id of the SMS campaign (required) - * @param \SendinBlue\Client\Model\UpdateSmsCampaign $updateSmsCampaign Values to update an SMS Campaign (required) + * @param int $campaign_id id of the SMS campaign (required) + * @param \SendinBlue\Client\Model\UpdateSmsCampaign $update_sms_campaign Values to update an SMS Campaign (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function updateSmsCampaignWithHttpInfo($campaignId, $updateSmsCampaign) + public function updateSmsCampaignWithHttpInfo($campaign_id, $update_sms_campaign) { $returnType = ''; - $request = $this->updateSmsCampaignRequest($campaignId, $updateSmsCampaign); + $request = $this->updateSmsCampaignRequest($campaign_id, $update_sms_campaign); try { $options = $this->createHttpClientOption(); @@ -2453,15 +2404,15 @@ public function updateSmsCampaignWithHttpInfo($campaignId, $updateSmsCampaign) * * Update an SMS campaign * - * @param int $campaignId id of the SMS campaign (required) - * @param \SendinBlue\Client\Model\UpdateSmsCampaign $updateSmsCampaign Values to update an SMS Campaign (required) + * @param int $campaign_id id of the SMS campaign (required) + * @param \SendinBlue\Client\Model\UpdateSmsCampaign $update_sms_campaign Values to update an SMS Campaign (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateSmsCampaignAsync($campaignId, $updateSmsCampaign) + public function updateSmsCampaignAsync($campaign_id, $update_sms_campaign) { - return $this->updateSmsCampaignAsyncWithHttpInfo($campaignId, $updateSmsCampaign) + return $this->updateSmsCampaignAsyncWithHttpInfo($campaign_id, $update_sms_campaign) ->then( function ($response) { return $response[0]; @@ -2474,16 +2425,16 @@ function ($response) { * * Update an SMS campaign * - * @param int $campaignId id of the SMS campaign (required) - * @param \SendinBlue\Client\Model\UpdateSmsCampaign $updateSmsCampaign Values to update an SMS Campaign (required) + * @param int $campaign_id id of the SMS campaign (required) + * @param \SendinBlue\Client\Model\UpdateSmsCampaign $update_sms_campaign Values to update an SMS Campaign (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateSmsCampaignAsyncWithHttpInfo($campaignId, $updateSmsCampaign) + public function updateSmsCampaignAsyncWithHttpInfo($campaign_id, $update_sms_campaign) { $returnType = ''; - $request = $this->updateSmsCampaignRequest($campaignId, $updateSmsCampaign); + $request = $this->updateSmsCampaignRequest($campaign_id, $update_sms_campaign); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2511,24 +2462,24 @@ function ($exception) { /** * Create request for operation 'updateSmsCampaign' * - * @param int $campaignId id of the SMS campaign (required) - * @param \SendinBlue\Client\Model\UpdateSmsCampaign $updateSmsCampaign Values to update an SMS Campaign (required) + * @param int $campaign_id id of the SMS campaign (required) + * @param \SendinBlue\Client\Model\UpdateSmsCampaign $update_sms_campaign Values to update an SMS Campaign (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function updateSmsCampaignRequest($campaignId, $updateSmsCampaign) + protected function updateSmsCampaignRequest($campaign_id, $update_sms_campaign) { - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + // verify the required parameter 'campaign_id' is set + if ($campaign_id === null || (is_array($campaign_id) && count($campaign_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling updateSmsCampaign' + 'Missing the required parameter $campaign_id when calling updateSmsCampaign' ); } - // verify the required parameter 'updateSmsCampaign' is set - if ($updateSmsCampaign === null || (is_array($updateSmsCampaign) && count($updateSmsCampaign) === 0)) { + // verify the required parameter 'update_sms_campaign' is set + if ($update_sms_campaign === null || (is_array($update_sms_campaign) && count($update_sms_campaign) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $updateSmsCampaign when calling updateSmsCampaign' + 'Missing the required parameter $update_sms_campaign when calling updateSmsCampaign' ); } @@ -2541,18 +2492,18 @@ protected function updateSmsCampaignRequest($campaignId, $updateSmsCampaign) // path params - if ($campaignId !== null) { + if ($campaign_id !== null) { $resourcePath = str_replace( '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), + ObjectSerializer::toPathValue($campaign_id), $resourcePath ); } // body params $_tempBody = null; - if (isset($updateSmsCampaign)) { - $_tempBody = $updateSmsCampaign; + if (isset($update_sms_campaign)) { + $_tempBody = $update_sms_campaign; } if ($multipart) { @@ -2607,11 +2558,6 @@ protected function updateSmsCampaignRequest($campaignId, $updateSmsCampaign) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -2638,16 +2584,16 @@ protected function updateSmsCampaignRequest($campaignId, $updateSmsCampaign) * * Update a campaign's status * - * @param int $campaignId id of the campaign (required) + * @param int $campaign_id id of the campaign (required) * @param \SendinBlue\Client\Model\UpdateCampaignStatus $status Status of the campaign. (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function updateSmsCampaignStatus($campaignId, $status) + public function updateSmsCampaignStatus($campaign_id, $status) { - $this->updateSmsCampaignStatusWithHttpInfo($campaignId, $status); + $this->updateSmsCampaignStatusWithHttpInfo($campaign_id, $status); } /** @@ -2655,17 +2601,17 @@ public function updateSmsCampaignStatus($campaignId, $status) * * Update a campaign's status * - * @param int $campaignId id of the campaign (required) + * @param int $campaign_id id of the campaign (required) * @param \SendinBlue\Client\Model\UpdateCampaignStatus $status Status of the campaign. (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function updateSmsCampaignStatusWithHttpInfo($campaignId, $status) + public function updateSmsCampaignStatusWithHttpInfo($campaign_id, $status) { $returnType = ''; - $request = $this->updateSmsCampaignStatusRequest($campaignId, $status); + $request = $this->updateSmsCampaignStatusRequest($campaign_id, $status); try { $options = $this->createHttpClientOption(); @@ -2725,15 +2671,15 @@ public function updateSmsCampaignStatusWithHttpInfo($campaignId, $status) * * Update a campaign's status * - * @param int $campaignId id of the campaign (required) + * @param int $campaign_id id of the campaign (required) * @param \SendinBlue\Client\Model\UpdateCampaignStatus $status Status of the campaign. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateSmsCampaignStatusAsync($campaignId, $status) + public function updateSmsCampaignStatusAsync($campaign_id, $status) { - return $this->updateSmsCampaignStatusAsyncWithHttpInfo($campaignId, $status) + return $this->updateSmsCampaignStatusAsyncWithHttpInfo($campaign_id, $status) ->then( function ($response) { return $response[0]; @@ -2746,16 +2692,16 @@ function ($response) { * * Update a campaign's status * - * @param int $campaignId id of the campaign (required) + * @param int $campaign_id id of the campaign (required) * @param \SendinBlue\Client\Model\UpdateCampaignStatus $status Status of the campaign. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateSmsCampaignStatusAsyncWithHttpInfo($campaignId, $status) + public function updateSmsCampaignStatusAsyncWithHttpInfo($campaign_id, $status) { $returnType = ''; - $request = $this->updateSmsCampaignStatusRequest($campaignId, $status); + $request = $this->updateSmsCampaignStatusRequest($campaign_id, $status); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2783,18 +2729,18 @@ function ($exception) { /** * Create request for operation 'updateSmsCampaignStatus' * - * @param int $campaignId id of the campaign (required) + * @param int $campaign_id id of the campaign (required) * @param \SendinBlue\Client\Model\UpdateCampaignStatus $status Status of the campaign. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function updateSmsCampaignStatusRequest($campaignId, $status) + protected function updateSmsCampaignStatusRequest($campaign_id, $status) { - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + // verify the required parameter 'campaign_id' is set + if ($campaign_id === null || (is_array($campaign_id) && count($campaign_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling updateSmsCampaignStatus' + 'Missing the required parameter $campaign_id when calling updateSmsCampaignStatus' ); } // verify the required parameter 'status' is set @@ -2813,10 +2759,10 @@ protected function updateSmsCampaignStatusRequest($campaignId, $status) // path params - if ($campaignId !== null) { + if ($campaign_id !== null) { $resourcePath = str_replace( '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), + ObjectSerializer::toPathValue($campaign_id), $resourcePath ); } @@ -2879,11 +2825,6 @@ protected function updateSmsCampaignStatusRequest($campaignId, $status) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { diff --git a/lib/Api/TransactionalEmailsApi.php b/lib/Api/SMTPApi.php similarity index 71% rename from lib/Api/TransactionalEmailsApi.php rename to lib/Api/SMTPApi.php index 659814aa..1b3c50e3 100644 --- a/lib/Api/TransactionalEmailsApi.php +++ b/lib/Api/SMTPApi.php @@ -1,6 +1,6 @@ blockNewDomainWithHttpInfo($blockDomain); + $this->blockNewDomainWithHttpInfo($block_domain); } /** @@ -108,16 +108,16 @@ public function blockNewDomain($blockDomain) * * Add a new domain to the list of blocked domains * - * @param \SendinBlue\Client\Model\BlockDomain $blockDomain (required) + * @param \SendinBlue\Client\Model\BlockDomain $block_domain (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function blockNewDomainWithHttpInfo($blockDomain) + public function blockNewDomainWithHttpInfo($block_domain) { $returnType = ''; - $request = $this->blockNewDomainRequest($blockDomain); + $request = $this->blockNewDomainRequest($block_domain); try { $options = $this->createHttpClientOption(); @@ -169,14 +169,14 @@ public function blockNewDomainWithHttpInfo($blockDomain) * * Add a new domain to the list of blocked domains * - * @param \SendinBlue\Client\Model\BlockDomain $blockDomain (required) + * @param \SendinBlue\Client\Model\BlockDomain $block_domain (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function blockNewDomainAsync($blockDomain) + public function blockNewDomainAsync($block_domain) { - return $this->blockNewDomainAsyncWithHttpInfo($blockDomain) + return $this->blockNewDomainAsyncWithHttpInfo($block_domain) ->then( function ($response) { return $response[0]; @@ -189,15 +189,15 @@ function ($response) { * * Add a new domain to the list of blocked domains * - * @param \SendinBlue\Client\Model\BlockDomain $blockDomain (required) + * @param \SendinBlue\Client\Model\BlockDomain $block_domain (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function blockNewDomainAsyncWithHttpInfo($blockDomain) + public function blockNewDomainAsyncWithHttpInfo($block_domain) { $returnType = ''; - $request = $this->blockNewDomainRequest($blockDomain); + $request = $this->blockNewDomainRequest($block_domain); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -225,17 +225,17 @@ function ($exception) { /** * Create request for operation 'blockNewDomain' * - * @param \SendinBlue\Client\Model\BlockDomain $blockDomain (required) + * @param \SendinBlue\Client\Model\BlockDomain $block_domain (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function blockNewDomainRequest($blockDomain) + protected function blockNewDomainRequest($block_domain) { - // verify the required parameter 'blockDomain' is set - if ($blockDomain === null || (is_array($blockDomain) && count($blockDomain) === 0)) { + // verify the required parameter 'block_domain' is set + if ($block_domain === null || (is_array($block_domain) && count($block_domain) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $blockDomain when calling blockNewDomain' + 'Missing the required parameter $block_domain when calling blockNewDomain' ); } @@ -250,8 +250,8 @@ protected function blockNewDomainRequest($blockDomain) // body params $_tempBody = null; - if (isset($blockDomain)) { - $_tempBody = $blockDomain; + if (isset($block_domain)) { + $_tempBody = $block_domain; } if ($multipart) { @@ -306,11 +306,6 @@ protected function blockNewDomainRequest($blockDomain) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -337,15 +332,15 @@ protected function blockNewDomainRequest($blockDomain) * * Create an email template * - * @param \SendinBlue\Client\Model\CreateSmtpTemplate $smtpTemplate values to update in transactional email template (required) + * @param \SendinBlue\Client\Model\CreateSmtpTemplate $smtp_template values to update in transactional email template (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\CreateModel */ - public function createSmtpTemplate($smtpTemplate) + public function createSmtpTemplate($smtp_template) { - list($response) = $this->createSmtpTemplateWithHttpInfo($smtpTemplate); + list($response) = $this->createSmtpTemplateWithHttpInfo($smtp_template); return $response; } @@ -354,16 +349,16 @@ public function createSmtpTemplate($smtpTemplate) * * Create an email template * - * @param \SendinBlue\Client\Model\CreateSmtpTemplate $smtpTemplate values to update in transactional email template (required) + * @param \SendinBlue\Client\Model\CreateSmtpTemplate $smtp_template values to update in transactional email template (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\CreateModel, HTTP status code, HTTP response headers (array of strings) */ - public function createSmtpTemplateWithHttpInfo($smtpTemplate) + public function createSmtpTemplateWithHttpInfo($smtp_template) { $returnType = '\SendinBlue\Client\Model\CreateModel'; - $request = $this->createSmtpTemplateRequest($smtpTemplate); + $request = $this->createSmtpTemplateRequest($smtp_template); try { $options = $this->createHttpClientOption(); @@ -437,14 +432,14 @@ public function createSmtpTemplateWithHttpInfo($smtpTemplate) * * Create an email template * - * @param \SendinBlue\Client\Model\CreateSmtpTemplate $smtpTemplate values to update in transactional email template (required) + * @param \SendinBlue\Client\Model\CreateSmtpTemplate $smtp_template values to update in transactional email template (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createSmtpTemplateAsync($smtpTemplate) + public function createSmtpTemplateAsync($smtp_template) { - return $this->createSmtpTemplateAsyncWithHttpInfo($smtpTemplate) + return $this->createSmtpTemplateAsyncWithHttpInfo($smtp_template) ->then( function ($response) { return $response[0]; @@ -457,15 +452,15 @@ function ($response) { * * Create an email template * - * @param \SendinBlue\Client\Model\CreateSmtpTemplate $smtpTemplate values to update in transactional email template (required) + * @param \SendinBlue\Client\Model\CreateSmtpTemplate $smtp_template values to update in transactional email template (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createSmtpTemplateAsyncWithHttpInfo($smtpTemplate) + public function createSmtpTemplateAsyncWithHttpInfo($smtp_template) { $returnType = '\SendinBlue\Client\Model\CreateModel'; - $request = $this->createSmtpTemplateRequest($smtpTemplate); + $request = $this->createSmtpTemplateRequest($smtp_template); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -507,17 +502,17 @@ function ($exception) { /** * Create request for operation 'createSmtpTemplate' * - * @param \SendinBlue\Client\Model\CreateSmtpTemplate $smtpTemplate values to update in transactional email template (required) + * @param \SendinBlue\Client\Model\CreateSmtpTemplate $smtp_template values to update in transactional email template (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function createSmtpTemplateRequest($smtpTemplate) + protected function createSmtpTemplateRequest($smtp_template) { - // verify the required parameter 'smtpTemplate' is set - if ($smtpTemplate === null || (is_array($smtpTemplate) && count($smtpTemplate) === 0)) { + // verify the required parameter 'smtp_template' is set + if ($smtp_template === null || (is_array($smtp_template) && count($smtp_template) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $smtpTemplate when calling createSmtpTemplate' + 'Missing the required parameter $smtp_template when calling createSmtpTemplate' ); } @@ -532,8 +527,8 @@ protected function createSmtpTemplateRequest($smtpTemplate) // body params $_tempBody = null; - if (isset($smtpTemplate)) { - $_tempBody = $smtpTemplate; + if (isset($smtp_template)) { + $_tempBody = $smtp_template; } if ($multipart) { @@ -588,11 +583,6 @@ protected function createSmtpTemplateRequest($smtpTemplate) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -838,11 +828,6 @@ protected function deleteBlockedDomainRequest($domain) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -869,15 +854,15 @@ protected function deleteBlockedDomainRequest($domain) * * Delete hardbounces * - * @param \SendinBlue\Client\Model\DeleteHardbounces $deleteHardbounces values to delete hardbounces (optional) + * @param \SendinBlue\Client\Model\DeleteHardbounces $delete_hardbounces values to delete hardbounces (optional) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function deleteHardbounces($deleteHardbounces = null) + public function deleteHardbounces($delete_hardbounces = null) { - $this->deleteHardbouncesWithHttpInfo($deleteHardbounces); + $this->deleteHardbouncesWithHttpInfo($delete_hardbounces); } /** @@ -885,16 +870,16 @@ public function deleteHardbounces($deleteHardbounces = null) * * Delete hardbounces * - * @param \SendinBlue\Client\Model\DeleteHardbounces $deleteHardbounces values to delete hardbounces (optional) + * @param \SendinBlue\Client\Model\DeleteHardbounces $delete_hardbounces values to delete hardbounces (optional) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteHardbouncesWithHttpInfo($deleteHardbounces = null) + public function deleteHardbouncesWithHttpInfo($delete_hardbounces = null) { $returnType = ''; - $request = $this->deleteHardbouncesRequest($deleteHardbounces); + $request = $this->deleteHardbouncesRequest($delete_hardbounces); try { $options = $this->createHttpClientOption(); @@ -946,14 +931,14 @@ public function deleteHardbouncesWithHttpInfo($deleteHardbounces = null) * * Delete hardbounces * - * @param \SendinBlue\Client\Model\DeleteHardbounces $deleteHardbounces values to delete hardbounces (optional) + * @param \SendinBlue\Client\Model\DeleteHardbounces $delete_hardbounces values to delete hardbounces (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteHardbouncesAsync($deleteHardbounces = null) + public function deleteHardbouncesAsync($delete_hardbounces = null) { - return $this->deleteHardbouncesAsyncWithHttpInfo($deleteHardbounces) + return $this->deleteHardbouncesAsyncWithHttpInfo($delete_hardbounces) ->then( function ($response) { return $response[0]; @@ -966,15 +951,15 @@ function ($response) { * * Delete hardbounces * - * @param \SendinBlue\Client\Model\DeleteHardbounces $deleteHardbounces values to delete hardbounces (optional) + * @param \SendinBlue\Client\Model\DeleteHardbounces $delete_hardbounces values to delete hardbounces (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteHardbouncesAsyncWithHttpInfo($deleteHardbounces = null) + public function deleteHardbouncesAsyncWithHttpInfo($delete_hardbounces = null) { $returnType = ''; - $request = $this->deleteHardbouncesRequest($deleteHardbounces); + $request = $this->deleteHardbouncesRequest($delete_hardbounces); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1002,12 +987,12 @@ function ($exception) { /** * Create request for operation 'deleteHardbounces' * - * @param \SendinBlue\Client\Model\DeleteHardbounces $deleteHardbounces values to delete hardbounces (optional) + * @param \SendinBlue\Client\Model\DeleteHardbounces $delete_hardbounces values to delete hardbounces (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function deleteHardbouncesRequest($deleteHardbounces = null) + protected function deleteHardbouncesRequest($delete_hardbounces = null) { $resourcePath = '/smtp/deleteHardbounces'; @@ -1021,8 +1006,8 @@ protected function deleteHardbouncesRequest($deleteHardbounces = null) // body params $_tempBody = null; - if (isset($deleteHardbounces)) { - $_tempBody = $deleteHardbounces; + if (isset($delete_hardbounces)) { + $_tempBody = $delete_hardbounces; } if ($multipart) { @@ -1077,11 +1062,6 @@ protected function deleteHardbouncesRequest($deleteHardbounces = null) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1103,278 +1083,20 @@ protected function deleteHardbouncesRequest($deleteHardbounces = null) ); } - /** - * Operation deleteScheduledEmailById - * - * Delete scheduled emails by batchId or messageId - * - * @param string $identifier The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. (required) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - */ - public function deleteScheduledEmailById($identifier) - { - $this->deleteScheduledEmailByIdWithHttpInfo($identifier); - } - - /** - * Operation deleteScheduledEmailByIdWithHttpInfo - * - * Delete scheduled emails by batchId or messageId - * - * @param string $identifier The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. (required) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function deleteScheduledEmailByIdWithHttpInfo($identifier) - { - $returnType = ''; - $request = $this->deleteScheduledEmailByIdRequest($identifier); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\ErrorModel', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\ErrorModel', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation deleteScheduledEmailByIdAsync - * - * Delete scheduled emails by batchId or messageId - * - * @param string $identifier The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function deleteScheduledEmailByIdAsync($identifier) - { - return $this->deleteScheduledEmailByIdAsyncWithHttpInfo($identifier) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation deleteScheduledEmailByIdAsyncWithHttpInfo - * - * Delete scheduled emails by batchId or messageId - * - * @param string $identifier The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function deleteScheduledEmailByIdAsyncWithHttpInfo($identifier) - { - $returnType = ''; - $request = $this->deleteScheduledEmailByIdRequest($identifier); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'deleteScheduledEmailById' - * - * @param string $identifier The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function deleteScheduledEmailByIdRequest($identifier) - { - // verify the required parameter 'identifier' is set - if ($identifier === null || (is_array($identifier) && count($identifier) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $identifier when calling deleteScheduledEmailById' - ); - } - - $resourcePath = '/smtp/email/{identifier}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($identifier !== null) { - $resourcePath = str_replace( - '{' . 'identifier' . '}', - ObjectSerializer::toPathValue($identifier), - $resourcePath - ); - } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - - if($headers['Content-Type'] === 'application/json') { - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass) { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - // array has no __toString(), so we should encode it manually - if(is_array($httpBody)) { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); - } - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('api-key'); - if ($apiKey !== null) { - $headers['api-key'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'DELETE', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - /** * Operation deleteSmtpTemplate * * Delete an inactive email template * - * @param int $templateId id of the template (required) + * @param int $template_id id of the template (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function deleteSmtpTemplate($templateId) + public function deleteSmtpTemplate($template_id) { - $this->deleteSmtpTemplateWithHttpInfo($templateId); + $this->deleteSmtpTemplateWithHttpInfo($template_id); } /** @@ -1382,16 +1104,16 @@ public function deleteSmtpTemplate($templateId) * * Delete an inactive email template * - * @param int $templateId id of the template (required) + * @param int $template_id id of the template (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteSmtpTemplateWithHttpInfo($templateId) + public function deleteSmtpTemplateWithHttpInfo($template_id) { $returnType = ''; - $request = $this->deleteSmtpTemplateRequest($templateId); + $request = $this->deleteSmtpTemplateRequest($template_id); try { $options = $this->createHttpClientOption(); @@ -1425,7 +1147,7 @@ public function deleteSmtpTemplateWithHttpInfo($templateId) } catch (ApiException $e) { switch ($e->getCode()) { - case 400: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -1433,7 +1155,7 @@ public function deleteSmtpTemplateWithHttpInfo($templateId) ); $e->setResponseObject($data); break; - case 404: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -1451,14 +1173,14 @@ public function deleteSmtpTemplateWithHttpInfo($templateId) * * Delete an inactive email template * - * @param int $templateId id of the template (required) + * @param int $template_id id of the template (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteSmtpTemplateAsync($templateId) + public function deleteSmtpTemplateAsync($template_id) { - return $this->deleteSmtpTemplateAsyncWithHttpInfo($templateId) + return $this->deleteSmtpTemplateAsyncWithHttpInfo($template_id) ->then( function ($response) { return $response[0]; @@ -1471,15 +1193,15 @@ function ($response) { * * Delete an inactive email template * - * @param int $templateId id of the template (required) + * @param int $template_id id of the template (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteSmtpTemplateAsyncWithHttpInfo($templateId) + public function deleteSmtpTemplateAsyncWithHttpInfo($template_id) { $returnType = ''; - $request = $this->deleteSmtpTemplateRequest($templateId); + $request = $this->deleteSmtpTemplateRequest($template_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1507,17 +1229,17 @@ function ($exception) { /** * Create request for operation 'deleteSmtpTemplate' * - * @param int $templateId id of the template (required) + * @param int $template_id id of the template (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function deleteSmtpTemplateRequest($templateId) + protected function deleteSmtpTemplateRequest($template_id) { - // verify the required parameter 'templateId' is set - if ($templateId === null || (is_array($templateId) && count($templateId) === 0)) { + // verify the required parameter 'template_id' is set + if ($template_id === null || (is_array($template_id) && count($template_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $templateId when calling deleteSmtpTemplate' + 'Missing the required parameter $template_id when calling deleteSmtpTemplate' ); } @@ -1530,10 +1252,10 @@ protected function deleteSmtpTemplateRequest($templateId) // path params - if ($templateId !== null) { + if ($template_id !== null) { $resourcePath = str_replace( '{' . 'templateId' . '}', - ObjectSerializer::toPathValue($templateId), + ObjectSerializer::toPathValue($template_id), $resourcePath ); } @@ -1593,11 +1315,6 @@ protected function deleteSmtpTemplateRequest($templateId) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1624,8 +1341,8 @@ protected function deleteSmtpTemplateRequest($templateId) * * Get your transactional email activity aggregated over a period of time * - * @param string $startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) - * @param string $endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param string $start_date Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param string $end_date Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) * @param string $tag Tag of the emails (optional) * @@ -1633,9 +1350,9 @@ protected function deleteSmtpTemplateRequest($templateId) * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\GetAggregatedReport */ - public function getAggregatedSmtpReport($startDate = null, $endDate = null, $days = null, $tag = null) + public function getAggregatedSmtpReport($start_date = null, $end_date = null, $days = null, $tag = null) { - list($response) = $this->getAggregatedSmtpReportWithHttpInfo($startDate, $endDate, $days, $tag); + list($response) = $this->getAggregatedSmtpReportWithHttpInfo($start_date, $end_date, $days, $tag); return $response; } @@ -1644,8 +1361,8 @@ public function getAggregatedSmtpReport($startDate = null, $endDate = null, $day * * Get your transactional email activity aggregated over a period of time * - * @param string $startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) - * @param string $endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param string $start_date Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param string $end_date Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) * @param string $tag Tag of the emails (optional) * @@ -1653,10 +1370,10 @@ public function getAggregatedSmtpReport($startDate = null, $endDate = null, $day * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\GetAggregatedReport, HTTP status code, HTTP response headers (array of strings) */ - public function getAggregatedSmtpReportWithHttpInfo($startDate = null, $endDate = null, $days = null, $tag = null) + public function getAggregatedSmtpReportWithHttpInfo($start_date = null, $end_date = null, $days = null, $tag = null) { $returnType = '\SendinBlue\Client\Model\GetAggregatedReport'; - $request = $this->getAggregatedSmtpReportRequest($startDate, $endDate, $days, $tag); + $request = $this->getAggregatedSmtpReportRequest($start_date, $end_date, $days, $tag); try { $options = $this->createHttpClientOption(); @@ -1730,17 +1447,17 @@ public function getAggregatedSmtpReportWithHttpInfo($startDate = null, $endDate * * Get your transactional email activity aggregated over a period of time * - * @param string $startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) - * @param string $endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param string $start_date Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param string $end_date Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) * @param string $tag Tag of the emails (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAggregatedSmtpReportAsync($startDate = null, $endDate = null, $days = null, $tag = null) + public function getAggregatedSmtpReportAsync($start_date = null, $end_date = null, $days = null, $tag = null) { - return $this->getAggregatedSmtpReportAsyncWithHttpInfo($startDate, $endDate, $days, $tag) + return $this->getAggregatedSmtpReportAsyncWithHttpInfo($start_date, $end_date, $days, $tag) ->then( function ($response) { return $response[0]; @@ -1753,18 +1470,18 @@ function ($response) { * * Get your transactional email activity aggregated over a period of time * - * @param string $startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) - * @param string $endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param string $start_date Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param string $end_date Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) * @param string $tag Tag of the emails (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAggregatedSmtpReportAsyncWithHttpInfo($startDate = null, $endDate = null, $days = null, $tag = null) + public function getAggregatedSmtpReportAsyncWithHttpInfo($start_date = null, $end_date = null, $days = null, $tag = null) { $returnType = '\SendinBlue\Client\Model\GetAggregatedReport'; - $request = $this->getAggregatedSmtpReportRequest($startDate, $endDate, $days, $tag); + $request = $this->getAggregatedSmtpReportRequest($start_date, $end_date, $days, $tag); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1806,15 +1523,15 @@ function ($exception) { /** * Create request for operation 'getAggregatedSmtpReport' * - * @param string $startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) - * @param string $endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param string $start_date Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param string $end_date Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) * @param string $tag Tag of the emails (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getAggregatedSmtpReportRequest($startDate = null, $endDate = null, $days = null, $tag = null) + protected function getAggregatedSmtpReportRequest($start_date = null, $end_date = null, $days = null, $tag = null) { $resourcePath = '/smtp/statistics/aggregatedReport'; @@ -1825,12 +1542,12 @@ protected function getAggregatedSmtpReportRequest($startDate = null, $endDate = $multipart = false; // query params - if ($startDate !== null) { - $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); + if ($start_date !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($start_date); } // query params - if ($endDate !== null) { - $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); + if ($end_date !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($end_date); } // query params if ($days !== null) { @@ -1897,11 +1614,6 @@ protected function getAggregatedSmtpReportRequest($startDate = null, $endDate = if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -2157,11 +1869,6 @@ protected function getBlockedDomainsRequest() if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -2190,23 +1897,22 @@ protected function getBlockedDomainsRequest() * * @param int $limit Number limitation for the result returned (optional, default to 50) * @param int $offset Beginning point in the list to retrieve from. (optional, default to 0) - * @param string $startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) - * @param string $endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param string $start_date Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param string $end_date Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) * @param string $email Filter the report for a specific email addresses (optional) * @param string $event Filter the report for a specific event type (optional) * @param string $tags Filter the report for tags (serialized and urlencoded array) (optional) - * @param string $messageId Filter on a specific message id (optional) - * @param int $templateId Filter on a specific template id (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $message_id Filter on a specific message id (optional) + * @param int $template_id Filter on a specific template id (optional) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\GetEmailEventReport */ - public function getEmailEventReport($limit = '50', $offset = '0', $startDate = null, $endDate = null, $days = null, $email = null, $event = null, $tags = null, $messageId = null, $templateId = null, $sort = 'desc') + public function getEmailEventReport($limit = '50', $offset = '0', $start_date = null, $end_date = null, $days = null, $email = null, $event = null, $tags = null, $message_id = null, $template_id = null) { - list($response) = $this->getEmailEventReportWithHttpInfo($limit, $offset, $startDate, $endDate, $days, $email, $event, $tags, $messageId, $templateId, $sort); + list($response) = $this->getEmailEventReportWithHttpInfo($limit, $offset, $start_date, $end_date, $days, $email, $event, $tags, $message_id, $template_id); return $response; } @@ -2217,24 +1923,23 @@ public function getEmailEventReport($limit = '50', $offset = '0', $startDate = n * * @param int $limit Number limitation for the result returned (optional, default to 50) * @param int $offset Beginning point in the list to retrieve from. (optional, default to 0) - * @param string $startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) - * @param string $endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param string $start_date Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param string $end_date Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) * @param string $email Filter the report for a specific email addresses (optional) * @param string $event Filter the report for a specific event type (optional) * @param string $tags Filter the report for tags (serialized and urlencoded array) (optional) - * @param string $messageId Filter on a specific message id (optional) - * @param int $templateId Filter on a specific template id (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $message_id Filter on a specific message id (optional) + * @param int $template_id Filter on a specific template id (optional) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\GetEmailEventReport, HTTP status code, HTTP response headers (array of strings) */ - public function getEmailEventReportWithHttpInfo($limit = '50', $offset = '0', $startDate = null, $endDate = null, $days = null, $email = null, $event = null, $tags = null, $messageId = null, $templateId = null, $sort = 'desc') + public function getEmailEventReportWithHttpInfo($limit = '50', $offset = '0', $start_date = null, $end_date = null, $days = null, $email = null, $event = null, $tags = null, $message_id = null, $template_id = null) { $returnType = '\SendinBlue\Client\Model\GetEmailEventReport'; - $request = $this->getEmailEventReportRequest($limit, $offset, $startDate, $endDate, $days, $email, $event, $tags, $messageId, $templateId, $sort); + $request = $this->getEmailEventReportRequest($limit, $offset, $start_date, $end_date, $days, $email, $event, $tags, $message_id, $template_id); try { $options = $this->createHttpClientOption(); @@ -2310,22 +2015,21 @@ public function getEmailEventReportWithHttpInfo($limit = '50', $offset = '0', $s * * @param int $limit Number limitation for the result returned (optional, default to 50) * @param int $offset Beginning point in the list to retrieve from. (optional, default to 0) - * @param string $startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) - * @param string $endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param string $start_date Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param string $end_date Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) * @param string $email Filter the report for a specific email addresses (optional) * @param string $event Filter the report for a specific event type (optional) * @param string $tags Filter the report for tags (serialized and urlencoded array) (optional) - * @param string $messageId Filter on a specific message id (optional) - * @param int $templateId Filter on a specific template id (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $message_id Filter on a specific message id (optional) + * @param int $template_id Filter on a specific template id (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEmailEventReportAsync($limit = '50', $offset = '0', $startDate = null, $endDate = null, $days = null, $email = null, $event = null, $tags = null, $messageId = null, $templateId = null, $sort = 'desc') + public function getEmailEventReportAsync($limit = '50', $offset = '0', $start_date = null, $end_date = null, $days = null, $email = null, $event = null, $tags = null, $message_id = null, $template_id = null) { - return $this->getEmailEventReportAsyncWithHttpInfo($limit, $offset, $startDate, $endDate, $days, $email, $event, $tags, $messageId, $templateId, $sort) + return $this->getEmailEventReportAsyncWithHttpInfo($limit, $offset, $start_date, $end_date, $days, $email, $event, $tags, $message_id, $template_id) ->then( function ($response) { return $response[0]; @@ -2340,23 +2044,22 @@ function ($response) { * * @param int $limit Number limitation for the result returned (optional, default to 50) * @param int $offset Beginning point in the list to retrieve from. (optional, default to 0) - * @param string $startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) - * @param string $endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param string $start_date Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param string $end_date Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) * @param string $email Filter the report for a specific email addresses (optional) * @param string $event Filter the report for a specific event type (optional) * @param string $tags Filter the report for tags (serialized and urlencoded array) (optional) - * @param string $messageId Filter on a specific message id (optional) - * @param int $templateId Filter on a specific template id (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $message_id Filter on a specific message id (optional) + * @param int $template_id Filter on a specific template id (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEmailEventReportAsyncWithHttpInfo($limit = '50', $offset = '0', $startDate = null, $endDate = null, $days = null, $email = null, $event = null, $tags = null, $messageId = null, $templateId = null, $sort = 'desc') + public function getEmailEventReportAsyncWithHttpInfo($limit = '50', $offset = '0', $start_date = null, $end_date = null, $days = null, $email = null, $event = null, $tags = null, $message_id = null, $template_id = null) { $returnType = '\SendinBlue\Client\Model\GetEmailEventReport'; - $request = $this->getEmailEventReportRequest($limit, $offset, $startDate, $endDate, $days, $email, $event, $tags, $messageId, $templateId, $sort); + $request = $this->getEmailEventReportRequest($limit, $offset, $start_date, $end_date, $days, $email, $event, $tags, $message_id, $template_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2400,23 +2103,22 @@ function ($exception) { * * @param int $limit Number limitation for the result returned (optional, default to 50) * @param int $offset Beginning point in the list to retrieve from. (optional, default to 0) - * @param string $startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) - * @param string $endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param string $start_date Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param string $end_date Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) * @param string $email Filter the report for a specific email addresses (optional) * @param string $event Filter the report for a specific event type (optional) * @param string $tags Filter the report for tags (serialized and urlencoded array) (optional) - * @param string $messageId Filter on a specific message id (optional) - * @param int $templateId Filter on a specific template id (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $message_id Filter on a specific message id (optional) + * @param int $template_id Filter on a specific template id (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getEmailEventReportRequest($limit = '50', $offset = '0', $startDate = null, $endDate = null, $days = null, $email = null, $event = null, $tags = null, $messageId = null, $templateId = null, $sort = 'desc') + protected function getEmailEventReportRequest($limit = '50', $offset = '0', $start_date = null, $end_date = null, $days = null, $email = null, $event = null, $tags = null, $message_id = null, $template_id = null) { if ($limit !== null && $limit > 100) { - throw new \InvalidArgumentException('invalid value for "$limit" when calling TransactionalEmailsApi.getEmailEventReport, must be smaller than or equal to 100.'); + throw new \InvalidArgumentException('invalid value for "$limit" when calling SMTPApi.getEmailEventReport, must be smaller than or equal to 100.'); } @@ -2436,12 +2138,12 @@ protected function getEmailEventReportRequest($limit = '50', $offset = '0', $sta $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); } // query params - if ($startDate !== null) { - $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); + if ($start_date !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($start_date); } // query params - if ($endDate !== null) { - $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); + if ($end_date !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($end_date); } // query params if ($days !== null) { @@ -2460,16 +2162,12 @@ protected function getEmailEventReportRequest($limit = '50', $offset = '0', $sta $queryParams['tags'] = ObjectSerializer::toQueryValue($tags); } // query params - if ($messageId !== null) { - $queryParams['messageId'] = ObjectSerializer::toQueryValue($messageId); - } - // query params - if ($templateId !== null) { - $queryParams['templateId'] = ObjectSerializer::toQueryValue($templateId); + if ($message_id !== null) { + $queryParams['messageId'] = ObjectSerializer::toQueryValue($message_id); } // query params - if ($sort !== null) { - $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + if ($template_id !== null) { + $queryParams['templateId'] = ObjectSerializer::toQueryValue($template_id); } @@ -2528,11 +2226,6 @@ protected function getEmailEventReportRequest($limit = '50', $offset = '0', $sta if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -2555,49 +2248,47 @@ protected function getEmailEventReportRequest($limit = '50', $offset = '0', $sta } /** - * Operation getScheduledEmailByBatchId + * Operation getSmtpReport * - * Fetch scheduled emails by batchId + * Get your transactional email activity aggregated per day * - * @param string $batchId The batchId of scheduled emails batch (Should be a valid UUIDv4) (required) - * @param \DateTime $startDate Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. (optional) - * @param \DateTime $endDate Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) - * @param string $status Filter the records by `status` of the scheduled email batch or message. (optional) - * @param int $limit Number of documents returned per page (optional, default to 100) + * @param int $limit Number of documents returned per page (optional, default to 10) * @param int $offset Index of the first document on the page (optional, default to 0) + * @param string $start_date Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) (optional) + * @param string $end_date Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) (optional) + * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param string $tag Tag of the emails (optional) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \SendinBlue\Client\Model\GetScheduledEmailByBatchId + * @return \SendinBlue\Client\Model\GetReports */ - public function getScheduledEmailByBatchId($batchId, $startDate = null, $endDate = null, $sort = 'desc', $status = null, $limit = '100', $offset = '0') + public function getSmtpReport($limit = '10', $offset = '0', $start_date = null, $end_date = null, $days = null, $tag = null) { - list($response) = $this->getScheduledEmailByBatchIdWithHttpInfo($batchId, $startDate, $endDate, $sort, $status, $limit, $offset); + list($response) = $this->getSmtpReportWithHttpInfo($limit, $offset, $start_date, $end_date, $days, $tag); return $response; } /** - * Operation getScheduledEmailByBatchIdWithHttpInfo + * Operation getSmtpReportWithHttpInfo * - * Fetch scheduled emails by batchId + * Get your transactional email activity aggregated per day * - * @param string $batchId The batchId of scheduled emails batch (Should be a valid UUIDv4) (required) - * @param \DateTime $startDate Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. (optional) - * @param \DateTime $endDate Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) - * @param string $status Filter the records by `status` of the scheduled email batch or message. (optional) - * @param int $limit Number of documents returned per page (optional, default to 100) + * @param int $limit Number of documents returned per page (optional, default to 10) * @param int $offset Index of the first document on the page (optional, default to 0) + * @param string $start_date Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) (optional) + * @param string $end_date Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) (optional) + * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param string $tag Tag of the emails (optional) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \SendinBlue\Client\Model\GetScheduledEmailByBatchId, HTTP status code, HTTP response headers (array of strings) + * @return array of \SendinBlue\Client\Model\GetReports, HTTP status code, HTTP response headers (array of strings) */ - public function getScheduledEmailByBatchIdWithHttpInfo($batchId, $startDate = null, $endDate = null, $sort = 'desc', $status = null, $limit = '100', $offset = '0') + public function getSmtpReportWithHttpInfo($limit = '10', $offset = '0', $start_date = null, $end_date = null, $days = null, $tag = null) { - $returnType = '\SendinBlue\Client\Model\GetScheduledEmailByBatchId'; - $request = $this->getScheduledEmailByBatchIdRequest($batchId, $startDate, $endDate, $sort, $status, $limit, $offset); + $returnType = '\SendinBlue\Client\Model\GetReports'; + $request = $this->getSmtpReportRequest($limit, $offset, $start_date, $end_date, $days, $tag); try { $options = $this->createHttpClientOption(); @@ -2648,7 +2339,7 @@ public function getScheduledEmailByBatchIdWithHttpInfo($batchId, $startDate = nu case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SendinBlue\Client\Model\GetScheduledEmailByBatchId', + '\SendinBlue\Client\Model\GetReports', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2661,38 +2352,29 @@ public function getScheduledEmailByBatchIdWithHttpInfo($batchId, $startDate = nu ); $e->setResponseObject($data); break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\ErrorModel', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; } throw $e; } } /** - * Operation getScheduledEmailByBatchIdAsync + * Operation getSmtpReportAsync * - * Fetch scheduled emails by batchId + * Get your transactional email activity aggregated per day * - * @param string $batchId The batchId of scheduled emails batch (Should be a valid UUIDv4) (required) - * @param \DateTime $startDate Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. (optional) - * @param \DateTime $endDate Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) - * @param string $status Filter the records by `status` of the scheduled email batch or message. (optional) - * @param int $limit Number of documents returned per page (optional, default to 100) + * @param int $limit Number of documents returned per page (optional, default to 10) * @param int $offset Index of the first document on the page (optional, default to 0) + * @param string $start_date Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) (optional) + * @param string $end_date Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) (optional) + * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param string $tag Tag of the emails (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getScheduledEmailByBatchIdAsync($batchId, $startDate = null, $endDate = null, $sort = 'desc', $status = null, $limit = '100', $offset = '0') + public function getSmtpReportAsync($limit = '10', $offset = '0', $start_date = null, $end_date = null, $days = null, $tag = null) { - return $this->getScheduledEmailByBatchIdAsyncWithHttpInfo($batchId, $startDate, $endDate, $sort, $status, $limit, $offset) + return $this->getSmtpReportAsyncWithHttpInfo($limit, $offset, $start_date, $end_date, $days, $tag) ->then( function ($response) { return $response[0]; @@ -2701,25 +2383,24 @@ function ($response) { } /** - * Operation getScheduledEmailByBatchIdAsyncWithHttpInfo + * Operation getSmtpReportAsyncWithHttpInfo * - * Fetch scheduled emails by batchId + * Get your transactional email activity aggregated per day * - * @param string $batchId The batchId of scheduled emails batch (Should be a valid UUIDv4) (required) - * @param \DateTime $startDate Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. (optional) - * @param \DateTime $endDate Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) - * @param string $status Filter the records by `status` of the scheduled email batch or message. (optional) - * @param int $limit Number of documents returned per page (optional, default to 100) + * @param int $limit Number of documents returned per page (optional, default to 10) * @param int $offset Index of the first document on the page (optional, default to 0) + * @param string $start_date Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) (optional) + * @param string $end_date Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) (optional) + * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param string $tag Tag of the emails (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getScheduledEmailByBatchIdAsyncWithHttpInfo($batchId, $startDate = null, $endDate = null, $sort = 'desc', $status = null, $limit = '100', $offset = '0') + public function getSmtpReportAsyncWithHttpInfo($limit = '10', $offset = '0', $start_date = null, $end_date = null, $days = null, $tag = null) { - $returnType = '\SendinBlue\Client\Model\GetScheduledEmailByBatchId'; - $request = $this->getScheduledEmailByBatchIdRequest($batchId, $startDate, $endDate, $sort, $status, $limit, $offset); + $returnType = '\SendinBlue\Client\Model\GetReports'; + $request = $this->getSmtpReportRequest($limit, $offset, $start_date, $end_date, $days, $tag); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2759,33 +2440,26 @@ function ($exception) { } /** - * Create request for operation 'getScheduledEmailByBatchId' - * - * @param string $batchId The batchId of scheduled emails batch (Should be a valid UUIDv4) (required) - * @param \DateTime $startDate Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. (optional) - * @param \DateTime $endDate Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) - * @param string $status Filter the records by `status` of the scheduled email batch or message. (optional) - * @param int $limit Number of documents returned per page (optional, default to 100) + * Create request for operation 'getSmtpReport' + * + * @param int $limit Number of documents returned per page (optional, default to 10) * @param int $offset Index of the first document on the page (optional, default to 0) + * @param string $start_date Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) (optional) + * @param string $end_date Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) (optional) + * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param string $tag Tag of the emails (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getScheduledEmailByBatchIdRequest($batchId, $startDate = null, $endDate = null, $sort = 'desc', $status = null, $limit = '100', $offset = '0') + protected function getSmtpReportRequest($limit = '10', $offset = '0', $start_date = null, $end_date = null, $days = null, $tag = null) { - // verify the required parameter 'batchId' is set - if ($batchId === null || (is_array($batchId) && count($batchId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $batchId when calling getScheduledEmailByBatchId' - ); - } - if ($limit !== null && $limit > 500) { - throw new \InvalidArgumentException('invalid value for "$limit" when calling TransactionalEmailsApi.getScheduledEmailByBatchId, must be smaller than or equal to 500.'); + if ($limit !== null && $limit > 30) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling SMTPApi.getSmtpReport, must be smaller than or equal to 30.'); } - $resourcePath = '/smtp/emailStatus/{batchId}'; + $resourcePath = '/smtp/statistics/reports'; $formParams = []; $queryParams = []; $headerParams = []; @@ -2793,38 +2467,30 @@ protected function getScheduledEmailByBatchIdRequest($batchId, $startDate = null $multipart = false; // query params - if ($startDate !== null) { - $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } // query params - if ($endDate !== null) { - $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); } // query params - if ($sort !== null) { - $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + if ($start_date !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($start_date); } // query params - if ($status !== null) { - $queryParams['status'] = ObjectSerializer::toQueryValue($status); + if ($end_date !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($end_date); } // query params - if ($limit !== null) { - $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + if ($days !== null) { + $queryParams['days'] = ObjectSerializer::toQueryValue($days); } // query params - if ($offset !== null) { - $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + if ($tag !== null) { + $queryParams['tag'] = ObjectSerializer::toQueryValue($tag); } - // path params - if ($batchId !== null) { - $resourcePath = str_replace( - '{' . 'batchId' . '}', - ObjectSerializer::toPathValue($batchId), - $resourcePath - ); - } // body params $_tempBody = null; @@ -2881,11 +2547,6 @@ protected function getScheduledEmailByBatchIdRequest($batchId, $startDate = null if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -2908,41 +2569,37 @@ protected function getScheduledEmailByBatchIdRequest($batchId, $startDate = null } /** - * Operation getScheduledEmailByMessageId + * Operation getSmtpTemplate * - * Fetch scheduled email by messageId + * Returns the template information * - * @param string $messageId The messageId of scheduled email (required) - * @param \DateTime $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. (optional) - * @param \DateTime $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param int $template_id id of the template (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \SendinBlue\Client\Model\GetScheduledEmailByMessageId + * @return \SendinBlue\Client\Model\GetSmtpTemplateOverview */ - public function getScheduledEmailByMessageId($messageId, $startDate = null, $endDate = null) + public function getSmtpTemplate($template_id) { - list($response) = $this->getScheduledEmailByMessageIdWithHttpInfo($messageId, $startDate, $endDate); + list($response) = $this->getSmtpTemplateWithHttpInfo($template_id); return $response; } /** - * Operation getScheduledEmailByMessageIdWithHttpInfo + * Operation getSmtpTemplateWithHttpInfo * - * Fetch scheduled email by messageId + * Returns the template information * - * @param string $messageId The messageId of scheduled email (required) - * @param \DateTime $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. (optional) - * @param \DateTime $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param int $template_id id of the template (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \SendinBlue\Client\Model\GetScheduledEmailByMessageId, HTTP status code, HTTP response headers (array of strings) + * @return array of \SendinBlue\Client\Model\GetSmtpTemplateOverview, HTTP status code, HTTP response headers (array of strings) */ - public function getScheduledEmailByMessageIdWithHttpInfo($messageId, $startDate = null, $endDate = null) + public function getSmtpTemplateWithHttpInfo($template_id) { - $returnType = '\SendinBlue\Client\Model\GetScheduledEmailByMessageId'; - $request = $this->getScheduledEmailByMessageIdRequest($messageId, $startDate, $endDate); + $returnType = '\SendinBlue\Client\Model\GetSmtpTemplateOverview'; + $request = $this->getSmtpTemplateRequest($template_id); try { $options = $this->createHttpClientOption(); @@ -2993,12 +2650,12 @@ public function getScheduledEmailByMessageIdWithHttpInfo($messageId, $startDate case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SendinBlue\Client\Model\GetScheduledEmailByMessageId', + '\SendinBlue\Client\Model\GetSmtpTemplateOverview', $e->getResponseHeaders() ); $e->setResponseObject($data); break; - case 400: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -3006,7 +2663,7 @@ public function getScheduledEmailByMessageIdWithHttpInfo($messageId, $startDate ); $e->setResponseObject($data); break; - case 404: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -3020,20 +2677,18 @@ public function getScheduledEmailByMessageIdWithHttpInfo($messageId, $startDate } /** - * Operation getScheduledEmailByMessageIdAsync + * Operation getSmtpTemplateAsync * - * Fetch scheduled email by messageId + * Returns the template information * - * @param string $messageId The messageId of scheduled email (required) - * @param \DateTime $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. (optional) - * @param \DateTime $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param int $template_id id of the template (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getScheduledEmailByMessageIdAsync($messageId, $startDate = null, $endDate = null) + public function getSmtpTemplateAsync($template_id) { - return $this->getScheduledEmailByMessageIdAsyncWithHttpInfo($messageId, $startDate, $endDate) + return $this->getSmtpTemplateAsyncWithHttpInfo($template_id) ->then( function ($response) { return $response[0]; @@ -3042,21 +2697,19 @@ function ($response) { } /** - * Operation getScheduledEmailByMessageIdAsyncWithHttpInfo + * Operation getSmtpTemplateAsyncWithHttpInfo * - * Fetch scheduled email by messageId + * Returns the template information * - * @param string $messageId The messageId of scheduled email (required) - * @param \DateTime $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. (optional) - * @param \DateTime $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param int $template_id id of the template (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getScheduledEmailByMessageIdAsyncWithHttpInfo($messageId, $startDate = null, $endDate = null) + public function getSmtpTemplateAsyncWithHttpInfo($template_id) { - $returnType = '\SendinBlue\Client\Model\GetScheduledEmailByMessageId'; - $request = $this->getScheduledEmailByMessageIdRequest($messageId, $startDate, $endDate); + $returnType = '\SendinBlue\Client\Model\GetSmtpTemplateOverview'; + $request = $this->getSmtpTemplateRequest($template_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3096,45 +2749,35 @@ function ($exception) { } /** - * Create request for operation 'getScheduledEmailByMessageId' + * Create request for operation 'getSmtpTemplate' * - * @param string $messageId The messageId of scheduled email (required) - * @param \DateTime $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. (optional) - * @param \DateTime $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param int $template_id id of the template (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getScheduledEmailByMessageIdRequest($messageId, $startDate = null, $endDate = null) + protected function getSmtpTemplateRequest($template_id) { - // verify the required parameter 'messageId' is set - if ($messageId === null || (is_array($messageId) && count($messageId) === 0)) { + // verify the required parameter 'template_id' is set + if ($template_id === null || (is_array($template_id) && count($template_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $messageId when calling getScheduledEmailByMessageId' + 'Missing the required parameter $template_id when calling getSmtpTemplate' ); } - $resourcePath = '/smtp/emailStatus/{messageId}'; + $resourcePath = '/smtp/templates/{templateId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if ($startDate !== null) { - $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); - } - // query params - if ($endDate !== null) { - $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); - } // path params - if ($messageId !== null) { + if ($template_id !== null) { $resourcePath = str_replace( - '{' . 'messageId' . '}', - ObjectSerializer::toPathValue($messageId), + '{' . 'templateId' . '}', + ObjectSerializer::toPathValue($template_id), $resourcePath ); } @@ -3194,11 +2837,6 @@ protected function getScheduledEmailByMessageIdRequest($messageId, $startDate = if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -3221,49 +2859,41 @@ protected function getScheduledEmailByMessageIdRequest($messageId, $startDate = } /** - * Operation getSmtpReport + * Operation getSmtpTemplates * - * Get your transactional email activity aggregated per day + * Get the list of email templates * - * @param int $limit Number of documents returned per page (optional, default to 10) - * @param int $offset Index of the first document on the page (optional, default to 0) - * @param string $startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) (optional) - * @param string $endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) (optional) - * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) - * @param string $tag Tag of the emails (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param bool $template_status Filter on the status of the template. Active = true, inactive = false (optional) + * @param int $limit Number of documents returned per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \SendinBlue\Client\Model\GetReports + * @return \SendinBlue\Client\Model\GetSmtpTemplates */ - public function getSmtpReport($limit = '10', $offset = '0', $startDate = null, $endDate = null, $days = null, $tag = null, $sort = 'desc') + public function getSmtpTemplates($template_status = null, $limit = '50', $offset = '0') { - list($response) = $this->getSmtpReportWithHttpInfo($limit, $offset, $startDate, $endDate, $days, $tag, $sort); + list($response) = $this->getSmtpTemplatesWithHttpInfo($template_status, $limit, $offset); return $response; } /** - * Operation getSmtpReportWithHttpInfo + * Operation getSmtpTemplatesWithHttpInfo * - * Get your transactional email activity aggregated per day + * Get the list of email templates * - * @param int $limit Number of documents returned per page (optional, default to 10) - * @param int $offset Index of the first document on the page (optional, default to 0) - * @param string $startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) (optional) - * @param string $endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) (optional) - * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) - * @param string $tag Tag of the emails (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param bool $template_status Filter on the status of the template. Active = true, inactive = false (optional) + * @param int $limit Number of documents returned per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \SendinBlue\Client\Model\GetReports, HTTP status code, HTTP response headers (array of strings) + * @return array of \SendinBlue\Client\Model\GetSmtpTemplates, HTTP status code, HTTP response headers (array of strings) */ - public function getSmtpReportWithHttpInfo($limit = '10', $offset = '0', $startDate = null, $endDate = null, $days = null, $tag = null, $sort = 'desc') + public function getSmtpTemplatesWithHttpInfo($template_status = null, $limit = '50', $offset = '0') { - $returnType = '\SendinBlue\Client\Model\GetReports'; - $request = $this->getSmtpReportRequest($limit, $offset, $startDate, $endDate, $days, $tag, $sort); + $returnType = '\SendinBlue\Client\Model\GetSmtpTemplates'; + $request = $this->getSmtpTemplatesRequest($template_status, $limit, $offset); try { $options = $this->createHttpClientOption(); @@ -3314,7 +2944,7 @@ public function getSmtpReportWithHttpInfo($limit = '10', $offset = '0', $startDa case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SendinBlue\Client\Model\GetReports', + '\SendinBlue\Client\Model\GetSmtpTemplates', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3333,24 +2963,20 @@ public function getSmtpReportWithHttpInfo($limit = '10', $offset = '0', $startDa } /** - * Operation getSmtpReportAsync + * Operation getSmtpTemplatesAsync * - * Get your transactional email activity aggregated per day + * Get the list of email templates * - * @param int $limit Number of documents returned per page (optional, default to 10) - * @param int $offset Index of the first document on the page (optional, default to 0) - * @param string $startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) (optional) - * @param string $endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) (optional) - * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) - * @param string $tag Tag of the emails (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param bool $template_status Filter on the status of the template. Active = true, inactive = false (optional) + * @param int $limit Number of documents returned per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSmtpReportAsync($limit = '10', $offset = '0', $startDate = null, $endDate = null, $days = null, $tag = null, $sort = 'desc') + public function getSmtpTemplatesAsync($template_status = null, $limit = '50', $offset = '0') { - return $this->getSmtpReportAsyncWithHttpInfo($limit, $offset, $startDate, $endDate, $days, $tag, $sort) + return $this->getSmtpTemplatesAsyncWithHttpInfo($template_status, $limit, $offset) ->then( function ($response) { return $response[0]; @@ -3359,25 +2985,21 @@ function ($response) { } /** - * Operation getSmtpReportAsyncWithHttpInfo + * Operation getSmtpTemplatesAsyncWithHttpInfo * - * Get your transactional email activity aggregated per day + * Get the list of email templates * - * @param int $limit Number of documents returned per page (optional, default to 10) - * @param int $offset Index of the first document on the page (optional, default to 0) - * @param string $startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) (optional) - * @param string $endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) (optional) - * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) - * @param string $tag Tag of the emails (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param bool $template_status Filter on the status of the template. Active = true, inactive = false (optional) + * @param int $limit Number of documents returned per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSmtpReportAsyncWithHttpInfo($limit = '10', $offset = '0', $startDate = null, $endDate = null, $days = null, $tag = null, $sort = 'desc') + public function getSmtpTemplatesAsyncWithHttpInfo($template_status = null, $limit = '50', $offset = '0') { - $returnType = '\SendinBlue\Client\Model\GetReports'; - $request = $this->getSmtpReportRequest($limit, $offset, $startDate, $endDate, $days, $tag, $sort); + $returnType = '\SendinBlue\Client\Model\GetSmtpTemplates'; + $request = $this->getSmtpTemplatesRequest($template_status, $limit, $offset); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3417,33 +3039,33 @@ function ($exception) { } /** - * Create request for operation 'getSmtpReport' + * Create request for operation 'getSmtpTemplates' * - * @param int $limit Number of documents returned per page (optional, default to 10) - * @param int $offset Index of the first document on the page (optional, default to 0) - * @param string $startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) (optional) - * @param string $endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) (optional) - * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) - * @param string $tag Tag of the emails (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param bool $template_status Filter on the status of the template. Active = true, inactive = false (optional) + * @param int $limit Number of documents returned per page (optional, default to 50) + * @param int $offset Index of the first document in the page (optional, default to 0) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getSmtpReportRequest($limit = '10', $offset = '0', $startDate = null, $endDate = null, $days = null, $tag = null, $sort = 'desc') + protected function getSmtpTemplatesRequest($template_status = null, $limit = '50', $offset = '0') { - if ($limit !== null && $limit > 30) { - throw new \InvalidArgumentException('invalid value for "$limit" when calling TransactionalEmailsApi.getSmtpReport, must be smaller than or equal to 30.'); + if ($limit !== null && $limit > 1000) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling SMTPApi.getSmtpTemplates, must be smaller than or equal to 1000.'); } - $resourcePath = '/smtp/statistics/reports'; + $resourcePath = '/smtp/templates'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + if ($template_status !== null) { + $queryParams['templateStatus'] = ObjectSerializer::toQueryValue($template_status); + } // query params if ($limit !== null) { $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); @@ -3452,26 +3074,6 @@ protected function getSmtpReportRequest($limit = '10', $offset = '0', $startDate if ($offset !== null) { $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); } - // query params - if ($startDate !== null) { - $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); - } - // query params - if ($endDate !== null) { - $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); - } - // query params - if ($days !== null) { - $queryParams['days'] = ObjectSerializer::toQueryValue($days); - } - // query params - if ($tag !== null) { - $queryParams['tag'] = ObjectSerializer::toQueryValue($tag); - } - // query params - if ($sort !== null) { - $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); - } // body params @@ -3529,11 +3131,6 @@ protected function getSmtpReportRequest($limit = '10', $offset = '0', $startDate if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -3556,37 +3153,45 @@ protected function getSmtpReportRequest($limit = '10', $offset = '0', $startDate } /** - * Operation getSmtpTemplate + * Operation getTransacBlockedContacts * - * Returns the template information + * Get the list of blocked or unsubscribed transactional contacts * - * @param int $templateId id of the template (required) + * @param string $start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the blocked or unsubscribed contacts (optional) + * @param string $end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the blocked or unsubscribed contacts (optional) + * @param int $limit Number of documents returned per page (optional, default to 50) + * @param int $offset Index of the first document on the page (optional, default to 0) + * @param string[] $senders Comma separated list of emails of the senders from which contacts are blocked or unsubscribed (optional) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \SendinBlue\Client\Model\GetSmtpTemplateOverview + * @return \SendinBlue\Client\Model\GetTransacBlockedContacts */ - public function getSmtpTemplate($templateId) + public function getTransacBlockedContacts($start_date = null, $end_date = null, $limit = '50', $offset = '0', $senders = null) { - list($response) = $this->getSmtpTemplateWithHttpInfo($templateId); + list($response) = $this->getTransacBlockedContactsWithHttpInfo($start_date, $end_date, $limit, $offset, $senders); return $response; } /** - * Operation getSmtpTemplateWithHttpInfo + * Operation getTransacBlockedContactsWithHttpInfo * - * Returns the template information + * Get the list of blocked or unsubscribed transactional contacts * - * @param int $templateId id of the template (required) + * @param string $start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the blocked or unsubscribed contacts (optional) + * @param string $end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the blocked or unsubscribed contacts (optional) + * @param int $limit Number of documents returned per page (optional, default to 50) + * @param int $offset Index of the first document on the page (optional, default to 0) + * @param string[] $senders Comma separated list of emails of the senders from which contacts are blocked or unsubscribed (optional) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \SendinBlue\Client\Model\GetSmtpTemplateOverview, HTTP status code, HTTP response headers (array of strings) + * @return array of \SendinBlue\Client\Model\GetTransacBlockedContacts, HTTP status code, HTTP response headers (array of strings) */ - public function getSmtpTemplateWithHttpInfo($templateId) + public function getTransacBlockedContactsWithHttpInfo($start_date = null, $end_date = null, $limit = '50', $offset = '0', $senders = null) { - $returnType = '\SendinBlue\Client\Model\GetSmtpTemplateOverview'; - $request = $this->getSmtpTemplateRequest($templateId); + $returnType = '\SendinBlue\Client\Model\GetTransacBlockedContacts'; + $request = $this->getTransacBlockedContactsRequest($start_date, $end_date, $limit, $offset, $senders); try { $options = $this->createHttpClientOption(); @@ -3637,7 +3242,7 @@ public function getSmtpTemplateWithHttpInfo($templateId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SendinBlue\Client\Model\GetSmtpTemplateOverview', + '\SendinBlue\Client\Model\GetTransacBlockedContacts', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3650,32 +3255,28 @@ public function getSmtpTemplateWithHttpInfo($templateId) ); $e->setResponseObject($data); break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\ErrorModel', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; } throw $e; } } /** - * Operation getSmtpTemplateAsync + * Operation getTransacBlockedContactsAsync * - * Returns the template information + * Get the list of blocked or unsubscribed transactional contacts * - * @param int $templateId id of the template (required) + * @param string $start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the blocked or unsubscribed contacts (optional) + * @param string $end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the blocked or unsubscribed contacts (optional) + * @param int $limit Number of documents returned per page (optional, default to 50) + * @param int $offset Index of the first document on the page (optional, default to 0) + * @param string[] $senders Comma separated list of emails of the senders from which contacts are blocked or unsubscribed (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSmtpTemplateAsync($templateId) + public function getTransacBlockedContactsAsync($start_date = null, $end_date = null, $limit = '50', $offset = '0', $senders = null) { - return $this->getSmtpTemplateAsyncWithHttpInfo($templateId) + return $this->getTransacBlockedContactsAsyncWithHttpInfo($start_date, $end_date, $limit, $offset, $senders) ->then( function ($response) { return $response[0]; @@ -3684,19 +3285,23 @@ function ($response) { } /** - * Operation getSmtpTemplateAsyncWithHttpInfo + * Operation getTransacBlockedContactsAsyncWithHttpInfo * - * Returns the template information + * Get the list of blocked or unsubscribed transactional contacts * - * @param int $templateId id of the template (required) + * @param string $start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the blocked or unsubscribed contacts (optional) + * @param string $end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the blocked or unsubscribed contacts (optional) + * @param int $limit Number of documents returned per page (optional, default to 50) + * @param int $offset Index of the first document on the page (optional, default to 0) + * @param string[] $senders Comma separated list of emails of the senders from which contacts are blocked or unsubscribed (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSmtpTemplateAsyncWithHttpInfo($templateId) + public function getTransacBlockedContactsAsyncWithHttpInfo($start_date = null, $end_date = null, $limit = '50', $offset = '0', $senders = null) { - $returnType = '\SendinBlue\Client\Model\GetSmtpTemplateOverview'; - $request = $this->getSmtpTemplateRequest($templateId); + $returnType = '\SendinBlue\Client\Model\GetTransacBlockedContacts'; + $request = $this->getTransacBlockedContactsRequest($start_date, $end_date, $limit, $offset, $senders); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3736,38 +3341,55 @@ function ($exception) { } /** - * Create request for operation 'getSmtpTemplate' + * Create request for operation 'getTransacBlockedContacts' * - * @param int $templateId id of the template (required) + * @param string $start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the blocked or unsubscribed contacts (optional) + * @param string $end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the blocked or unsubscribed contacts (optional) + * @param int $limit Number of documents returned per page (optional, default to 50) + * @param int $offset Index of the first document on the page (optional, default to 0) + * @param string[] $senders Comma separated list of emails of the senders from which contacts are blocked or unsubscribed (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getSmtpTemplateRequest($templateId) + protected function getTransacBlockedContactsRequest($start_date = null, $end_date = null, $limit = '50', $offset = '0', $senders = null) { - // verify the required parameter 'templateId' is set - if ($templateId === null || (is_array($templateId) && count($templateId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $templateId when calling getSmtpTemplate' - ); + if ($limit !== null && $limit > 100) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling SMTPApi.getTransacBlockedContacts, must be smaller than or equal to 100.'); } - $resourcePath = '/smtp/templates/{templateId}'; + + $resourcePath = '/smtp/blockedContacts'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - - // path params - if ($templateId !== null) { - $resourcePath = str_replace( - '{' . 'templateId' . '}', - ObjectSerializer::toPathValue($templateId), - $resourcePath - ); + // query params + if ($start_date !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($start_date); + } + // query params + if ($end_date !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($end_date); + } + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params + if (is_array($senders)) { + $queryParams['senders'] = $senders; + } else + if ($senders !== null) { + $queryParams['senders'] = ObjectSerializer::toQueryValue($senders); + } + // body params $_tempBody = null; @@ -3824,11 +3446,6 @@ protected function getSmtpTemplateRequest($templateId) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -3851,355 +3468,37 @@ protected function getSmtpTemplateRequest($templateId) } /** - * Operation getSmtpTemplates - * - * Get the list of email templates - * - * @param bool $templateStatus Filter on the status of the template. Active = true, inactive = false (optional) - * @param int $limit Number of documents returned per page (optional, default to 50) - * @param int $offset Index of the first document in the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \SendinBlue\Client\Model\GetSmtpTemplates - */ - public function getSmtpTemplates($templateStatus = null, $limit = '50', $offset = '0', $sort = 'desc') - { - list($response) = $this->getSmtpTemplatesWithHttpInfo($templateStatus, $limit, $offset, $sort); - return $response; - } - - /** - * Operation getSmtpTemplatesWithHttpInfo - * - * Get the list of email templates - * - * @param bool $templateStatus Filter on the status of the template. Active = true, inactive = false (optional) - * @param int $limit Number of documents returned per page (optional, default to 50) - * @param int $offset Index of the first document in the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) - * - * @throws \SendinBlue\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \SendinBlue\Client\Model\GetSmtpTemplates, HTTP status code, HTTP response headers (array of strings) - */ - public function getSmtpTemplatesWithHttpInfo($templateStatus = null, $limit = '50', $offset = '0', $sort = 'desc') - { - $returnType = '\SendinBlue\Client\Model\GetSmtpTemplates'; - $request = $this->getSmtpTemplatesRequest($templateStatus, $limit, $offset, $sort); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\GetSmtpTemplates', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\ErrorModel', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation getSmtpTemplatesAsync - * - * Get the list of email templates - * - * @param bool $templateStatus Filter on the status of the template. Active = true, inactive = false (optional) - * @param int $limit Number of documents returned per page (optional, default to 50) - * @param int $offset Index of the first document in the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getSmtpTemplatesAsync($templateStatus = null, $limit = '50', $offset = '0', $sort = 'desc') - { - return $this->getSmtpTemplatesAsyncWithHttpInfo($templateStatus, $limit, $offset, $sort) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation getSmtpTemplatesAsyncWithHttpInfo - * - * Get the list of email templates - * - * @param bool $templateStatus Filter on the status of the template. Active = true, inactive = false (optional) - * @param int $limit Number of documents returned per page (optional, default to 50) - * @param int $offset Index of the first document in the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getSmtpTemplatesAsyncWithHttpInfo($templateStatus = null, $limit = '50', $offset = '0', $sort = 'desc') - { - $returnType = '\SendinBlue\Client\Model\GetSmtpTemplates'; - $request = $this->getSmtpTemplatesRequest($templateStatus, $limit, $offset, $sort); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'getSmtpTemplates' - * - * @param bool $templateStatus Filter on the status of the template. Active = true, inactive = false (optional) - * @param int $limit Number of documents returned per page (optional, default to 50) - * @param int $offset Index of the first document in the page (optional, default to 0) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function getSmtpTemplatesRequest($templateStatus = null, $limit = '50', $offset = '0', $sort = 'desc') - { - if ($limit !== null && $limit > 1000) { - throw new \InvalidArgumentException('invalid value for "$limit" when calling TransactionalEmailsApi.getSmtpTemplates, must be smaller than or equal to 1000.'); - } - - - $resourcePath = '/smtp/templates'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($templateStatus !== null) { - $queryParams['templateStatus'] = ObjectSerializer::toQueryValue($templateStatus); - } - // query params - if ($limit !== null) { - $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); - } - // query params - if ($offset !== null) { - $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); - } - // query params - if ($sort !== null) { - $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); - } - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - - if($headers['Content-Type'] === 'application/json') { - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass) { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - // array has no __toString(), so we should encode it manually - if(is_array($httpBody)) { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); - } - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('api-key'); - if ($apiKey !== null) { - $headers['api-key'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation getTransacBlockedContacts + * Operation getTransacEmailContent * - * Get the list of blocked or unsubscribed transactional contacts + * Get the personalized content of a sent transactional email * - * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the blocked or unsubscribed contacts (optional) - * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the blocked or unsubscribed contacts (optional) - * @param int $limit Number of documents returned per page (optional, default to 50) - * @param int $offset Index of the first document on the page (optional, default to 0) - * @param string[] $senders Comma separated list of emails of the senders from which contacts are blocked or unsubscribed (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $uuid Unique id of the transactional email that has been sent to a particular contact (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \SendinBlue\Client\Model\GetTransacBlockedContacts + * @return \SendinBlue\Client\Model\GetTransacEmailContent */ - public function getTransacBlockedContacts($startDate = null, $endDate = null, $limit = '50', $offset = '0', $senders = null, $sort = 'desc') + public function getTransacEmailContent($uuid) { - list($response) = $this->getTransacBlockedContactsWithHttpInfo($startDate, $endDate, $limit, $offset, $senders, $sort); + list($response) = $this->getTransacEmailContentWithHttpInfo($uuid); return $response; } /** - * Operation getTransacBlockedContactsWithHttpInfo + * Operation getTransacEmailContentWithHttpInfo * - * Get the list of blocked or unsubscribed transactional contacts + * Get the personalized content of a sent transactional email * - * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the blocked or unsubscribed contacts (optional) - * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the blocked or unsubscribed contacts (optional) - * @param int $limit Number of documents returned per page (optional, default to 50) - * @param int $offset Index of the first document on the page (optional, default to 0) - * @param string[] $senders Comma separated list of emails of the senders from which contacts are blocked or unsubscribed (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $uuid Unique id of the transactional email that has been sent to a particular contact (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \SendinBlue\Client\Model\GetTransacBlockedContacts, HTTP status code, HTTP response headers (array of strings) + * @return array of \SendinBlue\Client\Model\GetTransacEmailContent, HTTP status code, HTTP response headers (array of strings) */ - public function getTransacBlockedContactsWithHttpInfo($startDate = null, $endDate = null, $limit = '50', $offset = '0', $senders = null, $sort = 'desc') + public function getTransacEmailContentWithHttpInfo($uuid) { - $returnType = '\SendinBlue\Client\Model\GetTransacBlockedContacts'; - $request = $this->getTransacBlockedContactsRequest($startDate, $endDate, $limit, $offset, $senders, $sort); + $returnType = '\SendinBlue\Client\Model\GetTransacEmailContent'; + $request = $this->getTransacEmailContentRequest($uuid); try { $options = $this->createHttpClientOption(); @@ -4250,15 +3549,7 @@ public function getTransacBlockedContactsWithHttpInfo($startDate = null, $endDat case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SendinBlue\Client\Model\GetTransacBlockedContacts', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\ErrorModel', + '\SendinBlue\Client\Model\GetTransacEmailContent', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4269,23 +3560,18 @@ public function getTransacBlockedContactsWithHttpInfo($startDate = null, $endDat } /** - * Operation getTransacBlockedContactsAsync + * Operation getTransacEmailContentAsync * - * Get the list of blocked or unsubscribed transactional contacts + * Get the personalized content of a sent transactional email * - * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the blocked or unsubscribed contacts (optional) - * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the blocked or unsubscribed contacts (optional) - * @param int $limit Number of documents returned per page (optional, default to 50) - * @param int $offset Index of the first document on the page (optional, default to 0) - * @param string[] $senders Comma separated list of emails of the senders from which contacts are blocked or unsubscribed (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $uuid Unique id of the transactional email that has been sent to a particular contact (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTransacBlockedContactsAsync($startDate = null, $endDate = null, $limit = '50', $offset = '0', $senders = null, $sort = 'desc') + public function getTransacEmailContentAsync($uuid) { - return $this->getTransacBlockedContactsAsyncWithHttpInfo($startDate, $endDate, $limit, $offset, $senders, $sort) + return $this->getTransacEmailContentAsyncWithHttpInfo($uuid) ->then( function ($response) { return $response[0]; @@ -4294,24 +3580,19 @@ function ($response) { } /** - * Operation getTransacBlockedContactsAsyncWithHttpInfo + * Operation getTransacEmailContentAsyncWithHttpInfo * - * Get the list of blocked or unsubscribed transactional contacts + * Get the personalized content of a sent transactional email * - * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the blocked or unsubscribed contacts (optional) - * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the blocked or unsubscribed contacts (optional) - * @param int $limit Number of documents returned per page (optional, default to 50) - * @param int $offset Index of the first document on the page (optional, default to 0) - * @param string[] $senders Comma separated list of emails of the senders from which contacts are blocked or unsubscribed (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $uuid Unique id of the transactional email that has been sent to a particular contact (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTransacBlockedContactsAsyncWithHttpInfo($startDate = null, $endDate = null, $limit = '50', $offset = '0', $senders = null, $sort = 'desc') + public function getTransacEmailContentAsyncWithHttpInfo($uuid) { - $returnType = '\SendinBlue\Client\Model\GetTransacBlockedContacts'; - $request = $this->getTransacBlockedContactsRequest($startDate, $endDate, $limit, $offset, $senders, $sort); + $returnType = '\SendinBlue\Client\Model\GetTransacEmailContent'; + $request = $this->getTransacEmailContentRequest($uuid); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4351,60 +3632,38 @@ function ($exception) { } /** - * Create request for operation 'getTransacBlockedContacts' + * Create request for operation 'getTransacEmailContent' * - * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the blocked or unsubscribed contacts (optional) - * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the blocked or unsubscribed contacts (optional) - * @param int $limit Number of documents returned per page (optional, default to 50) - * @param int $offset Index of the first document on the page (optional, default to 0) - * @param string[] $senders Comma separated list of emails of the senders from which contacts are blocked or unsubscribed (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $uuid Unique id of the transactional email that has been sent to a particular contact (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getTransacBlockedContactsRequest($startDate = null, $endDate = null, $limit = '50', $offset = '0', $senders = null, $sort = 'desc') + protected function getTransacEmailContentRequest($uuid) { - if ($limit !== null && $limit > 100) { - throw new \InvalidArgumentException('invalid value for "$limit" when calling TransactionalEmailsApi.getTransacBlockedContacts, must be smaller than or equal to 100.'); + // verify the required parameter 'uuid' is set + if ($uuid === null || (is_array($uuid) && count($uuid) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $uuid when calling getTransacEmailContent' + ); } - - $resourcePath = '/smtp/blockedContacts'; + $resourcePath = '/smtp/emails/{uuid}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if ($startDate !== null) { - $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); - } - // query params - if ($endDate !== null) { - $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); - } - // query params - if ($limit !== null) { - $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); - } - // query params - if ($offset !== null) { - $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); - } - // query params - if (is_array($senders)) { - $queryParams['senders'] = $senders; - } else - if ($senders !== null) { - $queryParams['senders'] = ObjectSerializer::toQueryValue($senders); - } - // query params - if ($sort !== null) { - $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); - } + // path params + if ($uuid !== null) { + $resourcePath = str_replace( + '{' . 'uuid' . '}', + ObjectSerializer::toPathValue($uuid), + $resourcePath + ); + } // body params $_tempBody = null; @@ -4461,11 +3720,6 @@ protected function getTransacBlockedContactsRequest($startDate = null, $endDate if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -4488,37 +3742,45 @@ protected function getTransacBlockedContactsRequest($startDate = null, $endDate } /** - * Operation getTransacEmailContent + * Operation getTransacEmailsList * - * Get the personalized content of a sent transactional email + * Get the list of transactional emails on the basis of allowed filters * - * @param string $uuid Unique id of the transactional email that has been sent to a particular contact (required) + * @param string $email Mandatory if templateId and messageId are not passed in query filters. Email address to which transactional email has been sent. (optional) + * @param int $template_id Mandatory if email and messageId are not passed in query filters. Id of the template that was used to compose transactional email. (optional) + * @param string $message_id Mandatory if templateId and email are not passed in query filters. Message ID of the transactional email sent. (optional) + * @param \DateTime $start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param \DateTime $end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \SendinBlue\Client\Model\GetTransacEmailContent + * @return \SendinBlue\Client\Model\GetTransacEmailsList */ - public function getTransacEmailContent($uuid) + public function getTransacEmailsList($email = null, $template_id = null, $message_id = null, $start_date = null, $end_date = null) { - list($response) = $this->getTransacEmailContentWithHttpInfo($uuid); + list($response) = $this->getTransacEmailsListWithHttpInfo($email, $template_id, $message_id, $start_date, $end_date); return $response; } /** - * Operation getTransacEmailContentWithHttpInfo + * Operation getTransacEmailsListWithHttpInfo * - * Get the personalized content of a sent transactional email + * Get the list of transactional emails on the basis of allowed filters * - * @param string $uuid Unique id of the transactional email that has been sent to a particular contact (required) + * @param string $email Mandatory if templateId and messageId are not passed in query filters. Email address to which transactional email has been sent. (optional) + * @param int $template_id Mandatory if email and messageId are not passed in query filters. Id of the template that was used to compose transactional email. (optional) + * @param string $message_id Mandatory if templateId and email are not passed in query filters. Message ID of the transactional email sent. (optional) + * @param \DateTime $start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param \DateTime $end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \SendinBlue\Client\Model\GetTransacEmailContent, HTTP status code, HTTP response headers (array of strings) + * @return array of \SendinBlue\Client\Model\GetTransacEmailsList, HTTP status code, HTTP response headers (array of strings) */ - public function getTransacEmailContentWithHttpInfo($uuid) + public function getTransacEmailsListWithHttpInfo($email = null, $template_id = null, $message_id = null, $start_date = null, $end_date = null) { - $returnType = '\SendinBlue\Client\Model\GetTransacEmailContent'; - $request = $this->getTransacEmailContentRequest($uuid); + $returnType = '\SendinBlue\Client\Model\GetTransacEmailsList'; + $request = $this->getTransacEmailsListRequest($email, $template_id, $message_id, $start_date, $end_date); try { $options = $this->createHttpClientOption(); @@ -4569,7 +3831,15 @@ public function getTransacEmailContentWithHttpInfo($uuid) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SendinBlue\Client\Model\GetTransacEmailContent', + '\SendinBlue\Client\Model\GetTransacEmailsList', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SendinBlue\Client\Model\ErrorModel', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4580,18 +3850,22 @@ public function getTransacEmailContentWithHttpInfo($uuid) } /** - * Operation getTransacEmailContentAsync + * Operation getTransacEmailsListAsync * - * Get the personalized content of a sent transactional email + * Get the list of transactional emails on the basis of allowed filters * - * @param string $uuid Unique id of the transactional email that has been sent to a particular contact (required) + * @param string $email Mandatory if templateId and messageId are not passed in query filters. Email address to which transactional email has been sent. (optional) + * @param int $template_id Mandatory if email and messageId are not passed in query filters. Id of the template that was used to compose transactional email. (optional) + * @param string $message_id Mandatory if templateId and email are not passed in query filters. Message ID of the transactional email sent. (optional) + * @param \DateTime $start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param \DateTime $end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTransacEmailContentAsync($uuid) + public function getTransacEmailsListAsync($email = null, $template_id = null, $message_id = null, $start_date = null, $end_date = null) { - return $this->getTransacEmailContentAsyncWithHttpInfo($uuid) + return $this->getTransacEmailsListAsyncWithHttpInfo($email, $template_id, $message_id, $start_date, $end_date) ->then( function ($response) { return $response[0]; @@ -4600,19 +3874,23 @@ function ($response) { } /** - * Operation getTransacEmailContentAsyncWithHttpInfo + * Operation getTransacEmailsListAsyncWithHttpInfo * - * Get the personalized content of a sent transactional email + * Get the list of transactional emails on the basis of allowed filters * - * @param string $uuid Unique id of the transactional email that has been sent to a particular contact (required) + * @param string $email Mandatory if templateId and messageId are not passed in query filters. Email address to which transactional email has been sent. (optional) + * @param int $template_id Mandatory if email and messageId are not passed in query filters. Id of the template that was used to compose transactional email. (optional) + * @param string $message_id Mandatory if templateId and email are not passed in query filters. Message ID of the transactional email sent. (optional) + * @param \DateTime $start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param \DateTime $end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTransacEmailContentAsyncWithHttpInfo($uuid) + public function getTransacEmailsListAsyncWithHttpInfo($email = null, $template_id = null, $message_id = null, $start_date = null, $end_date = null) { - $returnType = '\SendinBlue\Client\Model\GetTransacEmailContent'; - $request = $this->getTransacEmailContentRequest($uuid); + $returnType = '\SendinBlue\Client\Model\GetTransacEmailsList'; + $request = $this->getTransacEmailsListRequest($email, $template_id, $message_id, $start_date, $end_date); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4652,39 +3930,49 @@ function ($exception) { } /** - * Create request for operation 'getTransacEmailContent' + * Create request for operation 'getTransacEmailsList' * - * @param string $uuid Unique id of the transactional email that has been sent to a particular contact (required) + * @param string $email Mandatory if templateId and messageId are not passed in query filters. Email address to which transactional email has been sent. (optional) + * @param int $template_id Mandatory if email and messageId are not passed in query filters. Id of the template that was used to compose transactional email. (optional) + * @param string $message_id Mandatory if templateId and email are not passed in query filters. Message ID of the transactional email sent. (optional) + * @param \DateTime $start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Maximum time period that can be selected is one month. (optional) + * @param \DateTime $end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getTransacEmailContentRequest($uuid) + protected function getTransacEmailsListRequest($email = null, $template_id = null, $message_id = null, $start_date = null, $end_date = null) { - // verify the required parameter 'uuid' is set - if ($uuid === null || (is_array($uuid) && count($uuid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $uuid when calling getTransacEmailContent' - ); - } - $resourcePath = '/smtp/emails/{uuid}'; + $resourcePath = '/smtp/emails'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - - // path params - if ($uuid !== null) { - $resourcePath = str_replace( - '{' . 'uuid' . '}', - ObjectSerializer::toPathValue($uuid), - $resourcePath - ); + // query params + if ($email !== null) { + $queryParams['email'] = ObjectSerializer::toQueryValue($email); + } + // query params + if ($template_id !== null) { + $queryParams['templateId'] = ObjectSerializer::toQueryValue($template_id); + } + // query params + if ($message_id !== null) { + $queryParams['messageId'] = ObjectSerializer::toQueryValue($message_id); + } + // query params + if ($start_date !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($start_date); + } + // query params + if ($end_date !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($end_date); } + // body params $_tempBody = null; @@ -4740,11 +4028,6 @@ protected function getTransacEmailContentRequest($uuid) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -4767,51 +4050,39 @@ protected function getTransacEmailContentRequest($uuid) } /** - * Operation getTransacEmailsList + * Operation sendTemplate * - * Get the list of transactional emails on the basis of allowed filters + * Send a template * - * @param string $email Mandatory if templateId and messageId are not passed in query filters. Email address to which transactional email has been sent. (optional) - * @param int $templateId Mandatory if email and messageId are not passed in query filters. Id of the template that was used to compose transactional email. (optional) - * @param string $messageId Mandatory if templateId and email are not passed in query filters. Message ID of the transactional email sent. (optional) - * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Maximum time period that can be selected is one month. (optional) - * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) - * @param int $limit Number of documents returned per page (optional, default to 500) - * @param int $offset Index of the first document in the page (optional, default to 0) + * @param int $template_id Id of the template (required) + * @param \SendinBlue\Client\Model\SendEmail $send_email send_email (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \SendinBlue\Client\Model\GetTransacEmailsList + * @return \SendinBlue\Client\Model\SendTemplateEmail */ - public function getTransacEmailsList($email = null, $templateId = null, $messageId = null, $startDate = null, $endDate = null, $sort = 'desc', $limit = '500', $offset = '0') + public function sendTemplate($template_id, $send_email) { - list($response) = $this->getTransacEmailsListWithHttpInfo($email, $templateId, $messageId, $startDate, $endDate, $sort, $limit, $offset); + list($response) = $this->sendTemplateWithHttpInfo($template_id, $send_email); return $response; } /** - * Operation getTransacEmailsListWithHttpInfo + * Operation sendTemplateWithHttpInfo * - * Get the list of transactional emails on the basis of allowed filters + * Send a template * - * @param string $email Mandatory if templateId and messageId are not passed in query filters. Email address to which transactional email has been sent. (optional) - * @param int $templateId Mandatory if email and messageId are not passed in query filters. Id of the template that was used to compose transactional email. (optional) - * @param string $messageId Mandatory if templateId and email are not passed in query filters. Message ID of the transactional email sent. (optional) - * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Maximum time period that can be selected is one month. (optional) - * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) - * @param int $limit Number of documents returned per page (optional, default to 500) - * @param int $offset Index of the first document in the page (optional, default to 0) + * @param int $template_id Id of the template (required) + * @param \SendinBlue\Client\Model\SendEmail $send_email (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \SendinBlue\Client\Model\GetTransacEmailsList, HTTP status code, HTTP response headers (array of strings) + * @return array of \SendinBlue\Client\Model\SendTemplateEmail, HTTP status code, HTTP response headers (array of strings) */ - public function getTransacEmailsListWithHttpInfo($email = null, $templateId = null, $messageId = null, $startDate = null, $endDate = null, $sort = 'desc', $limit = '500', $offset = '0') + public function sendTemplateWithHttpInfo($template_id, $send_email) { - $returnType = '\SendinBlue\Client\Model\GetTransacEmailsList'; - $request = $this->getTransacEmailsListRequest($email, $templateId, $messageId, $startDate, $endDate, $sort, $limit, $offset); + $returnType = '\SendinBlue\Client\Model\SendTemplateEmail'; + $request = $this->sendTemplateRequest($template_id, $send_email); try { $options = $this->createHttpClientOption(); @@ -4859,15 +4130,23 @@ public function getTransacEmailsListWithHttpInfo($email = null, $templateId = nu } catch (ApiException $e) { switch ($e->getCode()) { - case 200: + case 201: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SendinBlue\Client\Model\GetTransacEmailsList', + '\SendinBlue\Client\Model\SendTemplateEmail', $e->getResponseHeaders() ); $e->setResponseObject($data); break; case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SendinBlue\Client\Model\PostSendFailed', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -4881,25 +4160,19 @@ public function getTransacEmailsListWithHttpInfo($email = null, $templateId = nu } /** - * Operation getTransacEmailsListAsync + * Operation sendTemplateAsync * - * Get the list of transactional emails on the basis of allowed filters + * Send a template * - * @param string $email Mandatory if templateId and messageId are not passed in query filters. Email address to which transactional email has been sent. (optional) - * @param int $templateId Mandatory if email and messageId are not passed in query filters. Id of the template that was used to compose transactional email. (optional) - * @param string $messageId Mandatory if templateId and email are not passed in query filters. Message ID of the transactional email sent. (optional) - * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Maximum time period that can be selected is one month. (optional) - * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) - * @param int $limit Number of documents returned per page (optional, default to 500) - * @param int $offset Index of the first document in the page (optional, default to 0) + * @param int $template_id Id of the template (required) + * @param \SendinBlue\Client\Model\SendEmail $send_email (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTransacEmailsListAsync($email = null, $templateId = null, $messageId = null, $startDate = null, $endDate = null, $sort = 'desc', $limit = '500', $offset = '0') + public function sendTemplateAsync($template_id, $send_email) { - return $this->getTransacEmailsListAsyncWithHttpInfo($email, $templateId, $messageId, $startDate, $endDate, $sort, $limit, $offset) + return $this->sendTemplateAsyncWithHttpInfo($template_id, $send_email) ->then( function ($response) { return $response[0]; @@ -4908,26 +4181,20 @@ function ($response) { } /** - * Operation getTransacEmailsListAsyncWithHttpInfo + * Operation sendTemplateAsyncWithHttpInfo * - * Get the list of transactional emails on the basis of allowed filters + * Send a template * - * @param string $email Mandatory if templateId and messageId are not passed in query filters. Email address to which transactional email has been sent. (optional) - * @param int $templateId Mandatory if email and messageId are not passed in query filters. Id of the template that was used to compose transactional email. (optional) - * @param string $messageId Mandatory if templateId and email are not passed in query filters. Message ID of the transactional email sent. (optional) - * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Maximum time period that can be selected is one month. (optional) - * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) - * @param int $limit Number of documents returned per page (optional, default to 500) - * @param int $offset Index of the first document in the page (optional, default to 0) + * @param int $template_id Id of the template (required) + * @param \SendinBlue\Client\Model\SendEmail $send_email (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTransacEmailsListAsyncWithHttpInfo($email = null, $templateId = null, $messageId = null, $startDate = null, $endDate = null, $sort = 'desc', $limit = '500', $offset = '0') + public function sendTemplateAsyncWithHttpInfo($template_id, $send_email) { - $returnType = '\SendinBlue\Client\Model\GetTransacEmailsList'; - $request = $this->getTransacEmailsListRequest($email, $templateId, $messageId, $startDate, $endDate, $sort, $limit, $offset); + $returnType = '\SendinBlue\Client\Model\SendTemplateEmail'; + $request = $this->sendTemplateRequest($template_id, $send_email); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4967,70 +4234,51 @@ function ($exception) { } /** - * Create request for operation 'getTransacEmailsList' + * Create request for operation 'sendTemplate' * - * @param string $email Mandatory if templateId and messageId are not passed in query filters. Email address to which transactional email has been sent. (optional) - * @param int $templateId Mandatory if email and messageId are not passed in query filters. Id of the template that was used to compose transactional email. (optional) - * @param string $messageId Mandatory if templateId and email are not passed in query filters. Message ID of the transactional email sent. (optional) - * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Maximum time period that can be selected is one month. (optional) - * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) - * @param int $limit Number of documents returned per page (optional, default to 500) - * @param int $offset Index of the first document in the page (optional, default to 0) + * @param int $template_id Id of the template (required) + * @param \SendinBlue\Client\Model\SendEmail $send_email (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getTransacEmailsListRequest($email = null, $templateId = null, $messageId = null, $startDate = null, $endDate = null, $sort = 'desc', $limit = '500', $offset = '0') + protected function sendTemplateRequest($template_id, $send_email) { - if ($limit !== null && $limit > 1000) { - throw new \InvalidArgumentException('invalid value for "$limit" when calling TransactionalEmailsApi.getTransacEmailsList, must be smaller than or equal to 1000.'); + // verify the required parameter 'template_id' is set + if ($template_id === null || (is_array($template_id) && count($template_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $template_id when calling sendTemplate' + ); + } + // verify the required parameter 'send_email' is set + if ($send_email === null || (is_array($send_email) && count($send_email) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $send_email when calling sendTemplate' + ); } - - $resourcePath = '/smtp/emails'; + $resourcePath = '/smtp/templates/{templateId}/send'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if ($email !== null) { - $queryParams['email'] = ObjectSerializer::toQueryValue($email); - } - // query params - if ($templateId !== null) { - $queryParams['templateId'] = ObjectSerializer::toQueryValue($templateId); - } - // query params - if ($messageId !== null) { - $queryParams['messageId'] = ObjectSerializer::toQueryValue($messageId); - } - // query params - if ($startDate !== null) { - $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); - } - // query params - if ($endDate !== null) { - $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); - } - // query params - if ($sort !== null) { - $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); - } - // query params - if ($limit !== null) { - $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); - } - // query params - if ($offset !== null) { - $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); - } + // path params + if ($template_id !== null) { + $resourcePath = str_replace( + '{' . 'templateId' . '}', + ObjectSerializer::toPathValue($template_id), + $resourcePath + ); + } // body params $_tempBody = null; + if (isset($send_email)) { + $_tempBody = $send_email; + } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( @@ -5084,11 +4332,6 @@ protected function getTransacEmailsListRequest($email = null, $templateId = null if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -5103,7 +4346,7 @@ protected function getTransacEmailsListRequest($email = null, $templateId = null $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( - 'GET', + 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -5115,16 +4358,16 @@ protected function getTransacEmailsListRequest($email = null, $templateId = null * * Send a template to your test list * - * @param int $templateId Id of the template (required) - * @param \SendinBlue\Client\Model\SendTestEmail $sendTestEmail sendTestEmail (required) + * @param int $template_id Id of the template (required) + * @param \SendinBlue\Client\Model\SendTestEmail $send_test_email send_test_email (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function sendTestTemplate($templateId, $sendTestEmail) + public function sendTestTemplate($template_id, $send_test_email) { - $this->sendTestTemplateWithHttpInfo($templateId, $sendTestEmail); + $this->sendTestTemplateWithHttpInfo($template_id, $send_test_email); } /** @@ -5132,17 +4375,17 @@ public function sendTestTemplate($templateId, $sendTestEmail) * * Send a template to your test list * - * @param int $templateId Id of the template (required) - * @param \SendinBlue\Client\Model\SendTestEmail $sendTestEmail (required) + * @param int $template_id Id of the template (required) + * @param \SendinBlue\Client\Model\SendTestEmail $send_test_email (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function sendTestTemplateWithHttpInfo($templateId, $sendTestEmail) + public function sendTestTemplateWithHttpInfo($template_id, $send_test_email) { $returnType = ''; - $request = $this->sendTestTemplateRequest($templateId, $sendTestEmail); + $request = $this->sendTestTemplateRequest($template_id, $send_test_email); try { $options = $this->createHttpClientOption(); @@ -5202,15 +4445,15 @@ public function sendTestTemplateWithHttpInfo($templateId, $sendTestEmail) * * Send a template to your test list * - * @param int $templateId Id of the template (required) - * @param \SendinBlue\Client\Model\SendTestEmail $sendTestEmail (required) + * @param int $template_id Id of the template (required) + * @param \SendinBlue\Client\Model\SendTestEmail $send_test_email (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function sendTestTemplateAsync($templateId, $sendTestEmail) + public function sendTestTemplateAsync($template_id, $send_test_email) { - return $this->sendTestTemplateAsyncWithHttpInfo($templateId, $sendTestEmail) + return $this->sendTestTemplateAsyncWithHttpInfo($template_id, $send_test_email) ->then( function ($response) { return $response[0]; @@ -5223,16 +4466,16 @@ function ($response) { * * Send a template to your test list * - * @param int $templateId Id of the template (required) - * @param \SendinBlue\Client\Model\SendTestEmail $sendTestEmail (required) + * @param int $template_id Id of the template (required) + * @param \SendinBlue\Client\Model\SendTestEmail $send_test_email (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function sendTestTemplateAsyncWithHttpInfo($templateId, $sendTestEmail) + public function sendTestTemplateAsyncWithHttpInfo($template_id, $send_test_email) { $returnType = ''; - $request = $this->sendTestTemplateRequest($templateId, $sendTestEmail); + $request = $this->sendTestTemplateRequest($template_id, $send_test_email); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5260,24 +4503,24 @@ function ($exception) { /** * Create request for operation 'sendTestTemplate' * - * @param int $templateId Id of the template (required) - * @param \SendinBlue\Client\Model\SendTestEmail $sendTestEmail (required) + * @param int $template_id Id of the template (required) + * @param \SendinBlue\Client\Model\SendTestEmail $send_test_email (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function sendTestTemplateRequest($templateId, $sendTestEmail) + protected function sendTestTemplateRequest($template_id, $send_test_email) { - // verify the required parameter 'templateId' is set - if ($templateId === null || (is_array($templateId) && count($templateId) === 0)) { + // verify the required parameter 'template_id' is set + if ($template_id === null || (is_array($template_id) && count($template_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $templateId when calling sendTestTemplate' + 'Missing the required parameter $template_id when calling sendTestTemplate' ); } - // verify the required parameter 'sendTestEmail' is set - if ($sendTestEmail === null || (is_array($sendTestEmail) && count($sendTestEmail) === 0)) { + // verify the required parameter 'send_test_email' is set + if ($send_test_email === null || (is_array($send_test_email) && count($send_test_email) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $sendTestEmail when calling sendTestTemplate' + 'Missing the required parameter $send_test_email when calling sendTestTemplate' ); } @@ -5290,18 +4533,18 @@ protected function sendTestTemplateRequest($templateId, $sendTestEmail) // path params - if ($templateId !== null) { + if ($template_id !== null) { $resourcePath = str_replace( '{' . 'templateId' . '}', - ObjectSerializer::toPathValue($templateId), + ObjectSerializer::toPathValue($template_id), $resourcePath ); } // body params $_tempBody = null; - if (isset($sendTestEmail)) { - $_tempBody = $sendTestEmail; + if (isset($send_test_email)) { + $_tempBody = $send_test_email; } if ($multipart) { @@ -5356,11 +4599,6 @@ protected function sendTestTemplateRequest($templateId, $sendTestEmail) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -5387,15 +4625,15 @@ protected function sendTestTemplateRequest($templateId, $sendTestEmail) * * Send a transactional email * - * @param \SendinBlue\Client\Model\SendSmtpEmail $sendSmtpEmail Values to send a transactional email (required) + * @param \SendinBlue\Client\Model\SendSmtpEmail $send_smtp_email Values to send a transactional email (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\CreateSmtpEmail */ - public function sendTransacEmail($sendSmtpEmail) + public function sendTransacEmail($send_smtp_email) { - list($response) = $this->sendTransacEmailWithHttpInfo($sendSmtpEmail); + list($response) = $this->sendTransacEmailWithHttpInfo($send_smtp_email); return $response; } @@ -5404,16 +4642,16 @@ public function sendTransacEmail($sendSmtpEmail) * * Send a transactional email * - * @param \SendinBlue\Client\Model\SendSmtpEmail $sendSmtpEmail Values to send a transactional email (required) + * @param \SendinBlue\Client\Model\SendSmtpEmail $send_smtp_email Values to send a transactional email (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\CreateSmtpEmail, HTTP status code, HTTP response headers (array of strings) */ - public function sendTransacEmailWithHttpInfo($sendSmtpEmail) + public function sendTransacEmailWithHttpInfo($send_smtp_email) { $returnType = '\SendinBlue\Client\Model\CreateSmtpEmail'; - $request = $this->sendTransacEmailRequest($sendSmtpEmail); + $request = $this->sendTransacEmailRequest($send_smtp_email); try { $options = $this->createHttpClientOption(); @@ -5469,14 +4707,6 @@ public function sendTransacEmailWithHttpInfo($sendSmtpEmail) ); $e->setResponseObject($data); break; - case 202: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SendinBlue\Client\Model\ScheduleSmtpEmail', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -5495,14 +4725,14 @@ public function sendTransacEmailWithHttpInfo($sendSmtpEmail) * * Send a transactional email * - * @param \SendinBlue\Client\Model\SendSmtpEmail $sendSmtpEmail Values to send a transactional email (required) + * @param \SendinBlue\Client\Model\SendSmtpEmail $send_smtp_email Values to send a transactional email (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function sendTransacEmailAsync($sendSmtpEmail) + public function sendTransacEmailAsync($send_smtp_email) { - return $this->sendTransacEmailAsyncWithHttpInfo($sendSmtpEmail) + return $this->sendTransacEmailAsyncWithHttpInfo($send_smtp_email) ->then( function ($response) { return $response[0]; @@ -5515,15 +4745,15 @@ function ($response) { * * Send a transactional email * - * @param \SendinBlue\Client\Model\SendSmtpEmail $sendSmtpEmail Values to send a transactional email (required) + * @param \SendinBlue\Client\Model\SendSmtpEmail $send_smtp_email Values to send a transactional email (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function sendTransacEmailAsyncWithHttpInfo($sendSmtpEmail) + public function sendTransacEmailAsyncWithHttpInfo($send_smtp_email) { $returnType = '\SendinBlue\Client\Model\CreateSmtpEmail'; - $request = $this->sendTransacEmailRequest($sendSmtpEmail); + $request = $this->sendTransacEmailRequest($send_smtp_email); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5565,17 +4795,17 @@ function ($exception) { /** * Create request for operation 'sendTransacEmail' * - * @param \SendinBlue\Client\Model\SendSmtpEmail $sendSmtpEmail Values to send a transactional email (required) + * @param \SendinBlue\Client\Model\SendSmtpEmail $send_smtp_email Values to send a transactional email (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function sendTransacEmailRequest($sendSmtpEmail) + protected function sendTransacEmailRequest($send_smtp_email) { - // verify the required parameter 'sendSmtpEmail' is set - if ($sendSmtpEmail === null || (is_array($sendSmtpEmail) && count($sendSmtpEmail) === 0)) { + // verify the required parameter 'send_smtp_email' is set + if ($send_smtp_email === null || (is_array($send_smtp_email) && count($send_smtp_email) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $sendSmtpEmail when calling sendTransacEmail' + 'Missing the required parameter $send_smtp_email when calling sendTransacEmail' ); } @@ -5590,8 +4820,8 @@ protected function sendTransacEmailRequest($sendSmtpEmail) // body params $_tempBody = null; - if (isset($sendSmtpEmail)) { - $_tempBody = $sendSmtpEmail; + if (isset($send_smtp_email)) { + $_tempBody = $send_smtp_email; } if ($multipart) { @@ -5646,11 +4876,6 @@ protected function sendTransacEmailRequest($sendSmtpEmail) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -5904,11 +5129,6 @@ protected function smtpBlockedContactsEmailDeleteRequest($email) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -5935,15 +5155,15 @@ protected function smtpBlockedContactsEmailDeleteRequest($email) * * Delete an SMTP transactional log * - * @param string $messageId MessageId of the transactional log to delete (required) + * @param string $message_id MessageId of the transactional log to delete (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function smtpLogMessageIdDelete($messageId) + public function smtpLogMessageIdDelete($message_id) { - $this->smtpLogMessageIdDeleteWithHttpInfo($messageId); + $this->smtpLogMessageIdDeleteWithHttpInfo($message_id); } /** @@ -5951,16 +5171,16 @@ public function smtpLogMessageIdDelete($messageId) * * Delete an SMTP transactional log * - * @param string $messageId MessageId of the transactional log to delete (required) + * @param string $message_id MessageId of the transactional log to delete (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function smtpLogMessageIdDeleteWithHttpInfo($messageId) + public function smtpLogMessageIdDeleteWithHttpInfo($message_id) { $returnType = ''; - $request = $this->smtpLogMessageIdDeleteRequest($messageId); + $request = $this->smtpLogMessageIdDeleteRequest($message_id); try { $options = $this->createHttpClientOption(); @@ -5994,7 +5214,7 @@ public function smtpLogMessageIdDeleteWithHttpInfo($messageId) } catch (ApiException $e) { switch ($e->getCode()) { - case 400: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -6002,7 +5222,7 @@ public function smtpLogMessageIdDeleteWithHttpInfo($messageId) ); $e->setResponseObject($data); break; - case 404: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -6020,14 +5240,14 @@ public function smtpLogMessageIdDeleteWithHttpInfo($messageId) * * Delete an SMTP transactional log * - * @param string $messageId MessageId of the transactional log to delete (required) + * @param string $message_id MessageId of the transactional log to delete (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function smtpLogMessageIdDeleteAsync($messageId) + public function smtpLogMessageIdDeleteAsync($message_id) { - return $this->smtpLogMessageIdDeleteAsyncWithHttpInfo($messageId) + return $this->smtpLogMessageIdDeleteAsyncWithHttpInfo($message_id) ->then( function ($response) { return $response[0]; @@ -6040,15 +5260,15 @@ function ($response) { * * Delete an SMTP transactional log * - * @param string $messageId MessageId of the transactional log to delete (required) + * @param string $message_id MessageId of the transactional log to delete (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function smtpLogMessageIdDeleteAsyncWithHttpInfo($messageId) + public function smtpLogMessageIdDeleteAsyncWithHttpInfo($message_id) { $returnType = ''; - $request = $this->smtpLogMessageIdDeleteRequest($messageId); + $request = $this->smtpLogMessageIdDeleteRequest($message_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6076,17 +5296,17 @@ function ($exception) { /** * Create request for operation 'smtpLogMessageIdDelete' * - * @param string $messageId MessageId of the transactional log to delete (required) + * @param string $message_id MessageId of the transactional log to delete (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function smtpLogMessageIdDeleteRequest($messageId) + protected function smtpLogMessageIdDeleteRequest($message_id) { - // verify the required parameter 'messageId' is set - if ($messageId === null || (is_array($messageId) && count($messageId) === 0)) { + // verify the required parameter 'message_id' is set + if ($message_id === null || (is_array($message_id) && count($message_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $messageId when calling smtpLogMessageIdDelete' + 'Missing the required parameter $message_id when calling smtpLogMessageIdDelete' ); } @@ -6099,10 +5319,10 @@ protected function smtpLogMessageIdDeleteRequest($messageId) // path params - if ($messageId !== null) { + if ($message_id !== null) { $resourcePath = str_replace( '{' . 'messageId' . '}', - ObjectSerializer::toPathValue($messageId), + ObjectSerializer::toPathValue($message_id), $resourcePath ); } @@ -6162,11 +5382,6 @@ protected function smtpLogMessageIdDeleteRequest($messageId) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -6193,16 +5408,16 @@ protected function smtpLogMessageIdDeleteRequest($messageId) * * Update an email template * - * @param int $templateId id of the template (required) - * @param \SendinBlue\Client\Model\UpdateSmtpTemplate $smtpTemplate values to update in transactional email template (required) + * @param int $template_id id of the template (required) + * @param \SendinBlue\Client\Model\UpdateSmtpTemplate $smtp_template values to update in transactional email template (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function updateSmtpTemplate($templateId, $smtpTemplate) + public function updateSmtpTemplate($template_id, $smtp_template) { - $this->updateSmtpTemplateWithHttpInfo($templateId, $smtpTemplate); + $this->updateSmtpTemplateWithHttpInfo($template_id, $smtp_template); } /** @@ -6210,17 +5425,17 @@ public function updateSmtpTemplate($templateId, $smtpTemplate) * * Update an email template * - * @param int $templateId id of the template (required) - * @param \SendinBlue\Client\Model\UpdateSmtpTemplate $smtpTemplate values to update in transactional email template (required) + * @param int $template_id id of the template (required) + * @param \SendinBlue\Client\Model\UpdateSmtpTemplate $smtp_template values to update in transactional email template (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function updateSmtpTemplateWithHttpInfo($templateId, $smtpTemplate) + public function updateSmtpTemplateWithHttpInfo($template_id, $smtp_template) { $returnType = ''; - $request = $this->updateSmtpTemplateRequest($templateId, $smtpTemplate); + $request = $this->updateSmtpTemplateRequest($template_id, $smtp_template); try { $options = $this->createHttpClientOption(); @@ -6280,15 +5495,15 @@ public function updateSmtpTemplateWithHttpInfo($templateId, $smtpTemplate) * * Update an email template * - * @param int $templateId id of the template (required) - * @param \SendinBlue\Client\Model\UpdateSmtpTemplate $smtpTemplate values to update in transactional email template (required) + * @param int $template_id id of the template (required) + * @param \SendinBlue\Client\Model\UpdateSmtpTemplate $smtp_template values to update in transactional email template (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateSmtpTemplateAsync($templateId, $smtpTemplate) + public function updateSmtpTemplateAsync($template_id, $smtp_template) { - return $this->updateSmtpTemplateAsyncWithHttpInfo($templateId, $smtpTemplate) + return $this->updateSmtpTemplateAsyncWithHttpInfo($template_id, $smtp_template) ->then( function ($response) { return $response[0]; @@ -6301,16 +5516,16 @@ function ($response) { * * Update an email template * - * @param int $templateId id of the template (required) - * @param \SendinBlue\Client\Model\UpdateSmtpTemplate $smtpTemplate values to update in transactional email template (required) + * @param int $template_id id of the template (required) + * @param \SendinBlue\Client\Model\UpdateSmtpTemplate $smtp_template values to update in transactional email template (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateSmtpTemplateAsyncWithHttpInfo($templateId, $smtpTemplate) + public function updateSmtpTemplateAsyncWithHttpInfo($template_id, $smtp_template) { $returnType = ''; - $request = $this->updateSmtpTemplateRequest($templateId, $smtpTemplate); + $request = $this->updateSmtpTemplateRequest($template_id, $smtp_template); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6338,24 +5553,24 @@ function ($exception) { /** * Create request for operation 'updateSmtpTemplate' * - * @param int $templateId id of the template (required) - * @param \SendinBlue\Client\Model\UpdateSmtpTemplate $smtpTemplate values to update in transactional email template (required) + * @param int $template_id id of the template (required) + * @param \SendinBlue\Client\Model\UpdateSmtpTemplate $smtp_template values to update in transactional email template (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function updateSmtpTemplateRequest($templateId, $smtpTemplate) + protected function updateSmtpTemplateRequest($template_id, $smtp_template) { - // verify the required parameter 'templateId' is set - if ($templateId === null || (is_array($templateId) && count($templateId) === 0)) { + // verify the required parameter 'template_id' is set + if ($template_id === null || (is_array($template_id) && count($template_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $templateId when calling updateSmtpTemplate' + 'Missing the required parameter $template_id when calling updateSmtpTemplate' ); } - // verify the required parameter 'smtpTemplate' is set - if ($smtpTemplate === null || (is_array($smtpTemplate) && count($smtpTemplate) === 0)) { + // verify the required parameter 'smtp_template' is set + if ($smtp_template === null || (is_array($smtp_template) && count($smtp_template) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $smtpTemplate when calling updateSmtpTemplate' + 'Missing the required parameter $smtp_template when calling updateSmtpTemplate' ); } @@ -6368,18 +5583,18 @@ protected function updateSmtpTemplateRequest($templateId, $smtpTemplate) // path params - if ($templateId !== null) { + if ($template_id !== null) { $resourcePath = str_replace( '{' . 'templateId' . '}', - ObjectSerializer::toPathValue($templateId), + ObjectSerializer::toPathValue($template_id), $resourcePath ); } // body params $_tempBody = null; - if (isset($smtpTemplate)) { - $_tempBody = $smtpTemplate; + if (isset($smtp_template)) { + $_tempBody = $smtp_template; } if ($multipart) { @@ -6434,11 +5649,6 @@ protected function updateSmtpTemplateRequest($templateId, $smtpTemplate) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { diff --git a/lib/Api/SendersApi.php b/lib/Api/SendersApi.php index 79bffc13..ccf2e35b 100644 --- a/lib/Api/SendersApi.php +++ b/lib/Api/SendersApi.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -337,11 +337,6 @@ protected function createSenderRequest($sender = null) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -368,15 +363,15 @@ protected function createSenderRequest($sender = null) * * Delete a sender * - * @param int $senderId Id of the sender (required) + * @param int $sender_id Id of the sender (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function deleteSender($senderId) + public function deleteSender($sender_id) { - $this->deleteSenderWithHttpInfo($senderId); + $this->deleteSenderWithHttpInfo($sender_id); } /** @@ -384,16 +379,16 @@ public function deleteSender($senderId) * * Delete a sender * - * @param int $senderId Id of the sender (required) + * @param int $sender_id Id of the sender (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteSenderWithHttpInfo($senderId) + public function deleteSenderWithHttpInfo($sender_id) { $returnType = ''; - $request = $this->deleteSenderRequest($senderId); + $request = $this->deleteSenderRequest($sender_id); try { $options = $this->createHttpClientOption(); @@ -427,7 +422,7 @@ public function deleteSenderWithHttpInfo($senderId) } catch (ApiException $e) { switch ($e->getCode()) { - case 400: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -435,7 +430,7 @@ public function deleteSenderWithHttpInfo($senderId) ); $e->setResponseObject($data); break; - case 404: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -453,14 +448,14 @@ public function deleteSenderWithHttpInfo($senderId) * * Delete a sender * - * @param int $senderId Id of the sender (required) + * @param int $sender_id Id of the sender (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteSenderAsync($senderId) + public function deleteSenderAsync($sender_id) { - return $this->deleteSenderAsyncWithHttpInfo($senderId) + return $this->deleteSenderAsyncWithHttpInfo($sender_id) ->then( function ($response) { return $response[0]; @@ -473,15 +468,15 @@ function ($response) { * * Delete a sender * - * @param int $senderId Id of the sender (required) + * @param int $sender_id Id of the sender (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteSenderAsyncWithHttpInfo($senderId) + public function deleteSenderAsyncWithHttpInfo($sender_id) { $returnType = ''; - $request = $this->deleteSenderRequest($senderId); + $request = $this->deleteSenderRequest($sender_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -509,17 +504,17 @@ function ($exception) { /** * Create request for operation 'deleteSender' * - * @param int $senderId Id of the sender (required) + * @param int $sender_id Id of the sender (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function deleteSenderRequest($senderId) + protected function deleteSenderRequest($sender_id) { - // verify the required parameter 'senderId' is set - if ($senderId === null || (is_array($senderId) && count($senderId) === 0)) { + // verify the required parameter 'sender_id' is set + if ($sender_id === null || (is_array($sender_id) && count($sender_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $senderId when calling deleteSender' + 'Missing the required parameter $sender_id when calling deleteSender' ); } @@ -532,10 +527,10 @@ protected function deleteSenderRequest($senderId) // path params - if ($senderId !== null) { + if ($sender_id !== null) { $resourcePath = str_replace( '{' . 'senderId' . '}', - ObjectSerializer::toPathValue($senderId), + ObjectSerializer::toPathValue($sender_id), $resourcePath ); } @@ -595,11 +590,6 @@ protected function deleteSenderRequest($senderId) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -855,11 +845,6 @@ protected function getIpsRequest() if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -886,15 +871,15 @@ protected function getIpsRequest() * * Get all the dedicated IPs for a sender * - * @param int $senderId Id of the sender (required) + * @param int $sender_id Id of the sender (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\GetIpsFromSender */ - public function getIpsFromSender($senderId) + public function getIpsFromSender($sender_id) { - list($response) = $this->getIpsFromSenderWithHttpInfo($senderId); + list($response) = $this->getIpsFromSenderWithHttpInfo($sender_id); return $response; } @@ -903,16 +888,16 @@ public function getIpsFromSender($senderId) * * Get all the dedicated IPs for a sender * - * @param int $senderId Id of the sender (required) + * @param int $sender_id Id of the sender (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\GetIpsFromSender, HTTP status code, HTTP response headers (array of strings) */ - public function getIpsFromSenderWithHttpInfo($senderId) + public function getIpsFromSenderWithHttpInfo($sender_id) { $returnType = '\SendinBlue\Client\Model\GetIpsFromSender'; - $request = $this->getIpsFromSenderRequest($senderId); + $request = $this->getIpsFromSenderRequest($sender_id); try { $options = $this->createHttpClientOption(); @@ -968,7 +953,7 @@ public function getIpsFromSenderWithHttpInfo($senderId) ); $e->setResponseObject($data); break; - case 400: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -976,7 +961,7 @@ public function getIpsFromSenderWithHttpInfo($senderId) ); $e->setResponseObject($data); break; - case 404: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -994,14 +979,14 @@ public function getIpsFromSenderWithHttpInfo($senderId) * * Get all the dedicated IPs for a sender * - * @param int $senderId Id of the sender (required) + * @param int $sender_id Id of the sender (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getIpsFromSenderAsync($senderId) + public function getIpsFromSenderAsync($sender_id) { - return $this->getIpsFromSenderAsyncWithHttpInfo($senderId) + return $this->getIpsFromSenderAsyncWithHttpInfo($sender_id) ->then( function ($response) { return $response[0]; @@ -1014,15 +999,15 @@ function ($response) { * * Get all the dedicated IPs for a sender * - * @param int $senderId Id of the sender (required) + * @param int $sender_id Id of the sender (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getIpsFromSenderAsyncWithHttpInfo($senderId) + public function getIpsFromSenderAsyncWithHttpInfo($sender_id) { $returnType = '\SendinBlue\Client\Model\GetIpsFromSender'; - $request = $this->getIpsFromSenderRequest($senderId); + $request = $this->getIpsFromSenderRequest($sender_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1064,17 +1049,17 @@ function ($exception) { /** * Create request for operation 'getIpsFromSender' * - * @param int $senderId Id of the sender (required) + * @param int $sender_id Id of the sender (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getIpsFromSenderRequest($senderId) + protected function getIpsFromSenderRequest($sender_id) { - // verify the required parameter 'senderId' is set - if ($senderId === null || (is_array($senderId) && count($senderId) === 0)) { + // verify the required parameter 'sender_id' is set + if ($sender_id === null || (is_array($sender_id) && count($sender_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $senderId when calling getIpsFromSender' + 'Missing the required parameter $sender_id when calling getIpsFromSender' ); } @@ -1087,10 +1072,10 @@ protected function getIpsFromSenderRequest($senderId) // path params - if ($senderId !== null) { + if ($sender_id !== null) { $resourcePath = str_replace( '{' . 'senderId' . '}', - ObjectSerializer::toPathValue($senderId), + ObjectSerializer::toPathValue($sender_id), $resourcePath ); } @@ -1150,11 +1135,6 @@ protected function getIpsFromSenderRequest($senderId) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1436,11 +1416,6 @@ protected function getSendersRequest($ip = null, $domain = null) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1467,16 +1442,16 @@ protected function getSendersRequest($ip = null, $domain = null) * * Update a sender * - * @param int $senderId Id of the sender (required) + * @param int $sender_id Id of the sender (required) * @param \SendinBlue\Client\Model\UpdateSender $sender sender's name (optional) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function updateSender($senderId, $sender = null) + public function updateSender($sender_id, $sender = null) { - $this->updateSenderWithHttpInfo($senderId, $sender); + $this->updateSenderWithHttpInfo($sender_id, $sender); } /** @@ -1484,17 +1459,17 @@ public function updateSender($senderId, $sender = null) * * Update a sender * - * @param int $senderId Id of the sender (required) + * @param int $sender_id Id of the sender (required) * @param \SendinBlue\Client\Model\UpdateSender $sender sender's name (optional) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function updateSenderWithHttpInfo($senderId, $sender = null) + public function updateSenderWithHttpInfo($sender_id, $sender = null) { $returnType = ''; - $request = $this->updateSenderRequest($senderId, $sender); + $request = $this->updateSenderRequest($sender_id, $sender); try { $options = $this->createHttpClientOption(); @@ -1554,15 +1529,15 @@ public function updateSenderWithHttpInfo($senderId, $sender = null) * * Update a sender * - * @param int $senderId Id of the sender (required) + * @param int $sender_id Id of the sender (required) * @param \SendinBlue\Client\Model\UpdateSender $sender sender's name (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateSenderAsync($senderId, $sender = null) + public function updateSenderAsync($sender_id, $sender = null) { - return $this->updateSenderAsyncWithHttpInfo($senderId, $sender) + return $this->updateSenderAsyncWithHttpInfo($sender_id, $sender) ->then( function ($response) { return $response[0]; @@ -1575,16 +1550,16 @@ function ($response) { * * Update a sender * - * @param int $senderId Id of the sender (required) + * @param int $sender_id Id of the sender (required) * @param \SendinBlue\Client\Model\UpdateSender $sender sender's name (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateSenderAsyncWithHttpInfo($senderId, $sender = null) + public function updateSenderAsyncWithHttpInfo($sender_id, $sender = null) { $returnType = ''; - $request = $this->updateSenderRequest($senderId, $sender); + $request = $this->updateSenderRequest($sender_id, $sender); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1612,18 +1587,18 @@ function ($exception) { /** * Create request for operation 'updateSender' * - * @param int $senderId Id of the sender (required) + * @param int $sender_id Id of the sender (required) * @param \SendinBlue\Client\Model\UpdateSender $sender sender's name (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function updateSenderRequest($senderId, $sender = null) + protected function updateSenderRequest($sender_id, $sender = null) { - // verify the required parameter 'senderId' is set - if ($senderId === null || (is_array($senderId) && count($senderId) === 0)) { + // verify the required parameter 'sender_id' is set + if ($sender_id === null || (is_array($sender_id) && count($sender_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $senderId when calling updateSender' + 'Missing the required parameter $sender_id when calling updateSender' ); } @@ -1636,10 +1611,10 @@ protected function updateSenderRequest($senderId, $sender = null) // path params - if ($senderId !== null) { + if ($sender_id !== null) { $resourcePath = str_replace( '{' . 'senderId' . '}', - ObjectSerializer::toPathValue($senderId), + ObjectSerializer::toPathValue($sender_id), $resourcePath ); } @@ -1702,11 +1677,6 @@ protected function updateSenderRequest($senderId, $sender = null) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { diff --git a/lib/Api/TransactionalSMSApi.php b/lib/Api/TransactionalSMSApi.php index 740d0df4..e2d95b68 100644 --- a/lib/Api/TransactionalSMSApi.php +++ b/lib/Api/TransactionalSMSApi.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -93,22 +93,22 @@ public function getConfig() * Get all your SMS activity (unaggregated events) * * @param int $limit Number of documents per page (optional, default to 50) - * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) - * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param string $start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param string $end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) * @param int $offset Index of the first document of the page (optional, default to 0) * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) - * @param string $phoneNumber Filter the report for a specific phone number (optional) + * @param string $phone_number Filter the report for a specific phone number (optional) * @param string $event Filter the report for specific events (optional) * @param string $tags Filter the report for specific tags passed as a serialized urlencoded array (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\GetSmsEventReport */ - public function getSmsEvents($limit = '50', $startDate = null, $endDate = null, $offset = '0', $days = null, $phoneNumber = null, $event = null, $tags = null, $sort = 'desc') + public function getSmsEvents($limit = '50', $start_date = null, $end_date = null, $offset = '0', $days = null, $phone_number = null, $event = null, $tags = null, $sort = 'desc') { - list($response) = $this->getSmsEventsWithHttpInfo($limit, $startDate, $endDate, $offset, $days, $phoneNumber, $event, $tags, $sort); + list($response) = $this->getSmsEventsWithHttpInfo($limit, $start_date, $end_date, $offset, $days, $phone_number, $event, $tags, $sort); return $response; } @@ -118,23 +118,23 @@ public function getSmsEvents($limit = '50', $startDate = null, $endDate = null, * Get all your SMS activity (unaggregated events) * * @param int $limit Number of documents per page (optional, default to 50) - * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) - * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param string $start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param string $end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) * @param int $offset Index of the first document of the page (optional, default to 0) * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) - * @param string $phoneNumber Filter the report for a specific phone number (optional) + * @param string $phone_number Filter the report for a specific phone number (optional) * @param string $event Filter the report for specific events (optional) * @param string $tags Filter the report for specific tags passed as a serialized urlencoded array (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\GetSmsEventReport, HTTP status code, HTTP response headers (array of strings) */ - public function getSmsEventsWithHttpInfo($limit = '50', $startDate = null, $endDate = null, $offset = '0', $days = null, $phoneNumber = null, $event = null, $tags = null, $sort = 'desc') + public function getSmsEventsWithHttpInfo($limit = '50', $start_date = null, $end_date = null, $offset = '0', $days = null, $phone_number = null, $event = null, $tags = null, $sort = 'desc') { $returnType = '\SendinBlue\Client\Model\GetSmsEventReport'; - $request = $this->getSmsEventsRequest($limit, $startDate, $endDate, $offset, $days, $phoneNumber, $event, $tags, $sort); + $request = $this->getSmsEventsRequest($limit, $start_date, $end_date, $offset, $days, $phone_number, $event, $tags, $sort); try { $options = $this->createHttpClientOption(); @@ -209,21 +209,21 @@ public function getSmsEventsWithHttpInfo($limit = '50', $startDate = null, $endD * Get all your SMS activity (unaggregated events) * * @param int $limit Number of documents per page (optional, default to 50) - * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) - * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param string $start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param string $end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) * @param int $offset Index of the first document of the page (optional, default to 0) * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) - * @param string $phoneNumber Filter the report for a specific phone number (optional) + * @param string $phone_number Filter the report for a specific phone number (optional) * @param string $event Filter the report for specific events (optional) * @param string $tags Filter the report for specific tags passed as a serialized urlencoded array (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSmsEventsAsync($limit = '50', $startDate = null, $endDate = null, $offset = '0', $days = null, $phoneNumber = null, $event = null, $tags = null, $sort = 'desc') + public function getSmsEventsAsync($limit = '50', $start_date = null, $end_date = null, $offset = '0', $days = null, $phone_number = null, $event = null, $tags = null, $sort = 'desc') { - return $this->getSmsEventsAsyncWithHttpInfo($limit, $startDate, $endDate, $offset, $days, $phoneNumber, $event, $tags, $sort) + return $this->getSmsEventsAsyncWithHttpInfo($limit, $start_date, $end_date, $offset, $days, $phone_number, $event, $tags, $sort) ->then( function ($response) { return $response[0]; @@ -237,22 +237,22 @@ function ($response) { * Get all your SMS activity (unaggregated events) * * @param int $limit Number of documents per page (optional, default to 50) - * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) - * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param string $start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param string $end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) * @param int $offset Index of the first document of the page (optional, default to 0) * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) - * @param string $phoneNumber Filter the report for a specific phone number (optional) + * @param string $phone_number Filter the report for a specific phone number (optional) * @param string $event Filter the report for specific events (optional) * @param string $tags Filter the report for specific tags passed as a serialized urlencoded array (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSmsEventsAsyncWithHttpInfo($limit = '50', $startDate = null, $endDate = null, $offset = '0', $days = null, $phoneNumber = null, $event = null, $tags = null, $sort = 'desc') + public function getSmsEventsAsyncWithHttpInfo($limit = '50', $start_date = null, $end_date = null, $offset = '0', $days = null, $phone_number = null, $event = null, $tags = null, $sort = 'desc') { $returnType = '\SendinBlue\Client\Model\GetSmsEventReport'; - $request = $this->getSmsEventsRequest($limit, $startDate, $endDate, $offset, $days, $phoneNumber, $event, $tags, $sort); + $request = $this->getSmsEventsRequest($limit, $start_date, $end_date, $offset, $days, $phone_number, $event, $tags, $sort); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -295,19 +295,19 @@ function ($exception) { * Create request for operation 'getSmsEvents' * * @param int $limit Number of documents per page (optional, default to 50) - * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) - * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param string $start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param string $end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) * @param int $offset Index of the first document of the page (optional, default to 0) * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) - * @param string $phoneNumber Filter the report for a specific phone number (optional) + * @param string $phone_number Filter the report for a specific phone number (optional) * @param string $event Filter the report for specific events (optional) * @param string $tags Filter the report for specific tags passed as a serialized urlencoded array (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getSmsEventsRequest($limit = '50', $startDate = null, $endDate = null, $offset = '0', $days = null, $phoneNumber = null, $event = null, $tags = null, $sort = 'desc') + protected function getSmsEventsRequest($limit = '50', $start_date = null, $end_date = null, $offset = '0', $days = null, $phone_number = null, $event = null, $tags = null, $sort = 'desc') { if ($limit !== null && $limit > 100) { throw new \InvalidArgumentException('invalid value for "$limit" when calling TransactionalSMSApi.getSmsEvents, must be smaller than or equal to 100.'); @@ -326,12 +326,12 @@ protected function getSmsEventsRequest($limit = '50', $startDate = null, $endDat $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } // query params - if ($startDate !== null) { - $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); + if ($start_date !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($start_date); } // query params - if ($endDate !== null) { - $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); + if ($end_date !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($end_date); } // query params if ($offset !== null) { @@ -342,8 +342,8 @@ protected function getSmsEventsRequest($limit = '50', $startDate = null, $endDat $queryParams['days'] = ObjectSerializer::toQueryValue($days); } // query params - if ($phoneNumber !== null) { - $queryParams['phoneNumber'] = ObjectSerializer::toQueryValue($phoneNumber); + if ($phone_number !== null) { + $queryParams['phoneNumber'] = ObjectSerializer::toQueryValue($phone_number); } // query params if ($event !== null) { @@ -414,11 +414,6 @@ protected function getSmsEventsRequest($limit = '50', $startDate = null, $endDat if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -445,8 +440,8 @@ protected function getSmsEventsRequest($limit = '50', $startDate = null, $endDat * * Get your SMS activity aggregated over a period of time * - * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) - * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param string $start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param string $end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) * @param int $days Number of days in the past including today (positive integer). Not compatible with startDate and endDate (optional) * @param string $tag Filter on a tag (optional) * @@ -454,9 +449,9 @@ protected function getSmsEventsRequest($limit = '50', $startDate = null, $endDat * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\GetTransacAggregatedSmsReport */ - public function getTransacAggregatedSmsReport($startDate = null, $endDate = null, $days = null, $tag = null) + public function getTransacAggregatedSmsReport($start_date = null, $end_date = null, $days = null, $tag = null) { - list($response) = $this->getTransacAggregatedSmsReportWithHttpInfo($startDate, $endDate, $days, $tag); + list($response) = $this->getTransacAggregatedSmsReportWithHttpInfo($start_date, $end_date, $days, $tag); return $response; } @@ -465,8 +460,8 @@ public function getTransacAggregatedSmsReport($startDate = null, $endDate = null * * Get your SMS activity aggregated over a period of time * - * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) - * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param string $start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param string $end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) * @param int $days Number of days in the past including today (positive integer). Not compatible with startDate and endDate (optional) * @param string $tag Filter on a tag (optional) * @@ -474,10 +469,10 @@ public function getTransacAggregatedSmsReport($startDate = null, $endDate = null * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\GetTransacAggregatedSmsReport, HTTP status code, HTTP response headers (array of strings) */ - public function getTransacAggregatedSmsReportWithHttpInfo($startDate = null, $endDate = null, $days = null, $tag = null) + public function getTransacAggregatedSmsReportWithHttpInfo($start_date = null, $end_date = null, $days = null, $tag = null) { $returnType = '\SendinBlue\Client\Model\GetTransacAggregatedSmsReport'; - $request = $this->getTransacAggregatedSmsReportRequest($startDate, $endDate, $days, $tag); + $request = $this->getTransacAggregatedSmsReportRequest($start_date, $end_date, $days, $tag); try { $options = $this->createHttpClientOption(); @@ -551,17 +546,17 @@ public function getTransacAggregatedSmsReportWithHttpInfo($startDate = null, $en * * Get your SMS activity aggregated over a period of time * - * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) - * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param string $start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param string $end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) * @param int $days Number of days in the past including today (positive integer). Not compatible with startDate and endDate (optional) * @param string $tag Filter on a tag (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTransacAggregatedSmsReportAsync($startDate = null, $endDate = null, $days = null, $tag = null) + public function getTransacAggregatedSmsReportAsync($start_date = null, $end_date = null, $days = null, $tag = null) { - return $this->getTransacAggregatedSmsReportAsyncWithHttpInfo($startDate, $endDate, $days, $tag) + return $this->getTransacAggregatedSmsReportAsyncWithHttpInfo($start_date, $end_date, $days, $tag) ->then( function ($response) { return $response[0]; @@ -574,18 +569,18 @@ function ($response) { * * Get your SMS activity aggregated over a period of time * - * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) - * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param string $start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param string $end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) * @param int $days Number of days in the past including today (positive integer). Not compatible with startDate and endDate (optional) * @param string $tag Filter on a tag (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTransacAggregatedSmsReportAsyncWithHttpInfo($startDate = null, $endDate = null, $days = null, $tag = null) + public function getTransacAggregatedSmsReportAsyncWithHttpInfo($start_date = null, $end_date = null, $days = null, $tag = null) { $returnType = '\SendinBlue\Client\Model\GetTransacAggregatedSmsReport'; - $request = $this->getTransacAggregatedSmsReportRequest($startDate, $endDate, $days, $tag); + $request = $this->getTransacAggregatedSmsReportRequest($start_date, $end_date, $days, $tag); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -627,15 +622,15 @@ function ($exception) { /** * Create request for operation 'getTransacAggregatedSmsReport' * - * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) - * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param string $start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param string $end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) * @param int $days Number of days in the past including today (positive integer). Not compatible with startDate and endDate (optional) * @param string $tag Filter on a tag (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getTransacAggregatedSmsReportRequest($startDate = null, $endDate = null, $days = null, $tag = null) + protected function getTransacAggregatedSmsReportRequest($start_date = null, $end_date = null, $days = null, $tag = null) { $resourcePath = '/transactionalSMS/statistics/aggregatedReport'; @@ -646,12 +641,12 @@ protected function getTransacAggregatedSmsReportRequest($startDate = null, $endD $multipart = false; // query params - if ($startDate !== null) { - $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); + if ($start_date !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($start_date); } // query params - if ($endDate !== null) { - $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); + if ($end_date !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($end_date); } // query params if ($days !== null) { @@ -718,11 +713,6 @@ protected function getTransacAggregatedSmsReportRequest($startDate = null, $endD if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -749,19 +739,19 @@ protected function getTransacAggregatedSmsReportRequest($startDate = null, $endD * * Get your SMS activity aggregated per day * - * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) - * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param string $start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param string $end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) * @param string $tag Filter on a tag (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\GetTransacSmsReport */ - public function getTransacSmsReport($startDate = null, $endDate = null, $days = null, $tag = null, $sort = 'desc') + public function getTransacSmsReport($start_date = null, $end_date = null, $days = null, $tag = null, $sort = 'desc') { - list($response) = $this->getTransacSmsReportWithHttpInfo($startDate, $endDate, $days, $tag, $sort); + list($response) = $this->getTransacSmsReportWithHttpInfo($start_date, $end_date, $days, $tag, $sort); return $response; } @@ -770,20 +760,20 @@ public function getTransacSmsReport($startDate = null, $endDate = null, $days = * * Get your SMS activity aggregated per day * - * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) - * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param string $start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param string $end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) * @param string $tag Filter on a tag (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\GetTransacSmsReport, HTTP status code, HTTP response headers (array of strings) */ - public function getTransacSmsReportWithHttpInfo($startDate = null, $endDate = null, $days = null, $tag = null, $sort = 'desc') + public function getTransacSmsReportWithHttpInfo($start_date = null, $end_date = null, $days = null, $tag = null, $sort = 'desc') { $returnType = '\SendinBlue\Client\Model\GetTransacSmsReport'; - $request = $this->getTransacSmsReportRequest($startDate, $endDate, $days, $tag, $sort); + $request = $this->getTransacSmsReportRequest($start_date, $end_date, $days, $tag, $sort); try { $options = $this->createHttpClientOption(); @@ -857,18 +847,18 @@ public function getTransacSmsReportWithHttpInfo($startDate = null, $endDate = nu * * Get your SMS activity aggregated per day * - * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) - * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param string $start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param string $end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) * @param string $tag Filter on a tag (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTransacSmsReportAsync($startDate = null, $endDate = null, $days = null, $tag = null, $sort = 'desc') + public function getTransacSmsReportAsync($start_date = null, $end_date = null, $days = null, $tag = null, $sort = 'desc') { - return $this->getTransacSmsReportAsyncWithHttpInfo($startDate, $endDate, $days, $tag, $sort) + return $this->getTransacSmsReportAsyncWithHttpInfo($start_date, $end_date, $days, $tag, $sort) ->then( function ($response) { return $response[0]; @@ -881,19 +871,19 @@ function ($response) { * * Get your SMS activity aggregated per day * - * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) - * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param string $start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param string $end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) * @param string $tag Filter on a tag (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTransacSmsReportAsyncWithHttpInfo($startDate = null, $endDate = null, $days = null, $tag = null, $sort = 'desc') + public function getTransacSmsReportAsyncWithHttpInfo($start_date = null, $end_date = null, $days = null, $tag = null, $sort = 'desc') { $returnType = '\SendinBlue\Client\Model\GetTransacSmsReport'; - $request = $this->getTransacSmsReportRequest($startDate, $endDate, $days, $tag, $sort); + $request = $this->getTransacSmsReportRequest($start_date, $end_date, $days, $tag, $sort); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -935,16 +925,16 @@ function ($exception) { /** * Create request for operation 'getTransacSmsReport' * - * @param string $startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) - * @param string $endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param string $start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param string $end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) * @param int $days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) * @param string $tag Filter on a tag (optional) - * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $sort Sort the results in the ascending/descending order of record creation (optional, default to desc) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getTransacSmsReportRequest($startDate = null, $endDate = null, $days = null, $tag = null, $sort = 'desc') + protected function getTransacSmsReportRequest($start_date = null, $end_date = null, $days = null, $tag = null, $sort = 'desc') { $resourcePath = '/transactionalSMS/statistics/reports'; @@ -955,12 +945,12 @@ protected function getTransacSmsReportRequest($startDate = null, $endDate = null $multipart = false; // query params - if ($startDate !== null) { - $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); + if ($start_date !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($start_date); } // query params - if ($endDate !== null) { - $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); + if ($end_date !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($end_date); } // query params if ($days !== null) { @@ -1031,11 +1021,6 @@ protected function getTransacSmsReportRequest($startDate = null, $endDate = null if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1062,15 +1047,15 @@ protected function getTransacSmsReportRequest($startDate = null, $endDate = null * * Send SMS message to a mobile number * - * @param \SendinBlue\Client\Model\SendTransacSms $sendTransacSms Values to send a transactional SMS (required) + * @param \SendinBlue\Client\Model\SendTransacSms $send_transac_sms Values to send a transactional SMS (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\SendSms */ - public function sendTransacSms($sendTransacSms) + public function sendTransacSms($send_transac_sms) { - list($response) = $this->sendTransacSmsWithHttpInfo($sendTransacSms); + list($response) = $this->sendTransacSmsWithHttpInfo($send_transac_sms); return $response; } @@ -1079,16 +1064,16 @@ public function sendTransacSms($sendTransacSms) * * Send SMS message to a mobile number * - * @param \SendinBlue\Client\Model\SendTransacSms $sendTransacSms Values to send a transactional SMS (required) + * @param \SendinBlue\Client\Model\SendTransacSms $send_transac_sms Values to send a transactional SMS (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\SendSms, HTTP status code, HTTP response headers (array of strings) */ - public function sendTransacSmsWithHttpInfo($sendTransacSms) + public function sendTransacSmsWithHttpInfo($send_transac_sms) { $returnType = '\SendinBlue\Client\Model\SendSms'; - $request = $this->sendTransacSmsRequest($sendTransacSms); + $request = $this->sendTransacSmsRequest($send_transac_sms); try { $options = $this->createHttpClientOption(); @@ -1170,14 +1155,14 @@ public function sendTransacSmsWithHttpInfo($sendTransacSms) * * Send SMS message to a mobile number * - * @param \SendinBlue\Client\Model\SendTransacSms $sendTransacSms Values to send a transactional SMS (required) + * @param \SendinBlue\Client\Model\SendTransacSms $send_transac_sms Values to send a transactional SMS (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function sendTransacSmsAsync($sendTransacSms) + public function sendTransacSmsAsync($send_transac_sms) { - return $this->sendTransacSmsAsyncWithHttpInfo($sendTransacSms) + return $this->sendTransacSmsAsyncWithHttpInfo($send_transac_sms) ->then( function ($response) { return $response[0]; @@ -1190,15 +1175,15 @@ function ($response) { * * Send SMS message to a mobile number * - * @param \SendinBlue\Client\Model\SendTransacSms $sendTransacSms Values to send a transactional SMS (required) + * @param \SendinBlue\Client\Model\SendTransacSms $send_transac_sms Values to send a transactional SMS (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function sendTransacSmsAsyncWithHttpInfo($sendTransacSms) + public function sendTransacSmsAsyncWithHttpInfo($send_transac_sms) { $returnType = '\SendinBlue\Client\Model\SendSms'; - $request = $this->sendTransacSmsRequest($sendTransacSms); + $request = $this->sendTransacSmsRequest($send_transac_sms); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1240,17 +1225,17 @@ function ($exception) { /** * Create request for operation 'sendTransacSms' * - * @param \SendinBlue\Client\Model\SendTransacSms $sendTransacSms Values to send a transactional SMS (required) + * @param \SendinBlue\Client\Model\SendTransacSms $send_transac_sms Values to send a transactional SMS (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function sendTransacSmsRequest($sendTransacSms) + protected function sendTransacSmsRequest($send_transac_sms) { - // verify the required parameter 'sendTransacSms' is set - if ($sendTransacSms === null || (is_array($sendTransacSms) && count($sendTransacSms) === 0)) { + // verify the required parameter 'send_transac_sms' is set + if ($send_transac_sms === null || (is_array($send_transac_sms) && count($send_transac_sms) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $sendTransacSms when calling sendTransacSms' + 'Missing the required parameter $send_transac_sms when calling sendTransacSms' ); } @@ -1265,8 +1250,8 @@ protected function sendTransacSmsRequest($sendTransacSms) // body params $_tempBody = null; - if (isset($sendTransacSms)) { - $_tempBody = $sendTransacSms; + if (isset($send_transac_sms)) { + $_tempBody = $send_transac_sms; } if ($multipart) { @@ -1321,11 +1306,6 @@ protected function sendTransacSmsRequest($sendTransacSms) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { diff --git a/lib/Api/WebhooksApi.php b/lib/Api/WebhooksApi.php index 1519a89e..42795191 100644 --- a/lib/Api/WebhooksApi.php +++ b/lib/Api/WebhooksApi.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -92,15 +92,15 @@ public function getConfig() * * Create a webhook * - * @param \SendinBlue\Client\Model\CreateWebhook $createWebhook Values to create a webhook (required) + * @param \SendinBlue\Client\Model\CreateWebhook $create_webhook Values to create a webhook (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\CreateModel */ - public function createWebhook($createWebhook) + public function createWebhook($create_webhook) { - list($response) = $this->createWebhookWithHttpInfo($createWebhook); + list($response) = $this->createWebhookWithHttpInfo($create_webhook); return $response; } @@ -109,16 +109,16 @@ public function createWebhook($createWebhook) * * Create a webhook * - * @param \SendinBlue\Client\Model\CreateWebhook $createWebhook Values to create a webhook (required) + * @param \SendinBlue\Client\Model\CreateWebhook $create_webhook Values to create a webhook (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\CreateModel, HTTP status code, HTTP response headers (array of strings) */ - public function createWebhookWithHttpInfo($createWebhook) + public function createWebhookWithHttpInfo($create_webhook) { $returnType = '\SendinBlue\Client\Model\CreateModel'; - $request = $this->createWebhookRequest($createWebhook); + $request = $this->createWebhookRequest($create_webhook); try { $options = $this->createHttpClientOption(); @@ -192,14 +192,14 @@ public function createWebhookWithHttpInfo($createWebhook) * * Create a webhook * - * @param \SendinBlue\Client\Model\CreateWebhook $createWebhook Values to create a webhook (required) + * @param \SendinBlue\Client\Model\CreateWebhook $create_webhook Values to create a webhook (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createWebhookAsync($createWebhook) + public function createWebhookAsync($create_webhook) { - return $this->createWebhookAsyncWithHttpInfo($createWebhook) + return $this->createWebhookAsyncWithHttpInfo($create_webhook) ->then( function ($response) { return $response[0]; @@ -212,15 +212,15 @@ function ($response) { * * Create a webhook * - * @param \SendinBlue\Client\Model\CreateWebhook $createWebhook Values to create a webhook (required) + * @param \SendinBlue\Client\Model\CreateWebhook $create_webhook Values to create a webhook (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createWebhookAsyncWithHttpInfo($createWebhook) + public function createWebhookAsyncWithHttpInfo($create_webhook) { $returnType = '\SendinBlue\Client\Model\CreateModel'; - $request = $this->createWebhookRequest($createWebhook); + $request = $this->createWebhookRequest($create_webhook); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -262,17 +262,17 @@ function ($exception) { /** * Create request for operation 'createWebhook' * - * @param \SendinBlue\Client\Model\CreateWebhook $createWebhook Values to create a webhook (required) + * @param \SendinBlue\Client\Model\CreateWebhook $create_webhook Values to create a webhook (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function createWebhookRequest($createWebhook) + protected function createWebhookRequest($create_webhook) { - // verify the required parameter 'createWebhook' is set - if ($createWebhook === null || (is_array($createWebhook) && count($createWebhook) === 0)) { + // verify the required parameter 'create_webhook' is set + if ($create_webhook === null || (is_array($create_webhook) && count($create_webhook) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $createWebhook when calling createWebhook' + 'Missing the required parameter $create_webhook when calling createWebhook' ); } @@ -287,8 +287,8 @@ protected function createWebhookRequest($createWebhook) // body params $_tempBody = null; - if (isset($createWebhook)) { - $_tempBody = $createWebhook; + if (isset($create_webhook)) { + $_tempBody = $create_webhook; } if ($multipart) { @@ -343,11 +343,6 @@ protected function createWebhookRequest($createWebhook) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -374,15 +369,15 @@ protected function createWebhookRequest($createWebhook) * * Delete a webhook * - * @param int $webhookId Id of the webhook (required) + * @param int $webhook_id Id of the webhook (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function deleteWebhook($webhookId) + public function deleteWebhook($webhook_id) { - $this->deleteWebhookWithHttpInfo($webhookId); + $this->deleteWebhookWithHttpInfo($webhook_id); } /** @@ -390,16 +385,16 @@ public function deleteWebhook($webhookId) * * Delete a webhook * - * @param int $webhookId Id of the webhook (required) + * @param int $webhook_id Id of the webhook (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteWebhookWithHttpInfo($webhookId) + public function deleteWebhookWithHttpInfo($webhook_id) { $returnType = ''; - $request = $this->deleteWebhookRequest($webhookId); + $request = $this->deleteWebhookRequest($webhook_id); try { $options = $this->createHttpClientOption(); @@ -433,7 +428,7 @@ public function deleteWebhookWithHttpInfo($webhookId) } catch (ApiException $e) { switch ($e->getCode()) { - case 400: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -441,7 +436,7 @@ public function deleteWebhookWithHttpInfo($webhookId) ); $e->setResponseObject($data); break; - case 404: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -459,14 +454,14 @@ public function deleteWebhookWithHttpInfo($webhookId) * * Delete a webhook * - * @param int $webhookId Id of the webhook (required) + * @param int $webhook_id Id of the webhook (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteWebhookAsync($webhookId) + public function deleteWebhookAsync($webhook_id) { - return $this->deleteWebhookAsyncWithHttpInfo($webhookId) + return $this->deleteWebhookAsyncWithHttpInfo($webhook_id) ->then( function ($response) { return $response[0]; @@ -479,15 +474,15 @@ function ($response) { * * Delete a webhook * - * @param int $webhookId Id of the webhook (required) + * @param int $webhook_id Id of the webhook (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteWebhookAsyncWithHttpInfo($webhookId) + public function deleteWebhookAsyncWithHttpInfo($webhook_id) { $returnType = ''; - $request = $this->deleteWebhookRequest($webhookId); + $request = $this->deleteWebhookRequest($webhook_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -515,17 +510,17 @@ function ($exception) { /** * Create request for operation 'deleteWebhook' * - * @param int $webhookId Id of the webhook (required) + * @param int $webhook_id Id of the webhook (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function deleteWebhookRequest($webhookId) + protected function deleteWebhookRequest($webhook_id) { - // verify the required parameter 'webhookId' is set - if ($webhookId === null || (is_array($webhookId) && count($webhookId) === 0)) { + // verify the required parameter 'webhook_id' is set + if ($webhook_id === null || (is_array($webhook_id) && count($webhook_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $webhookId when calling deleteWebhook' + 'Missing the required parameter $webhook_id when calling deleteWebhook' ); } @@ -538,10 +533,10 @@ protected function deleteWebhookRequest($webhookId) // path params - if ($webhookId !== null) { + if ($webhook_id !== null) { $resourcePath = str_replace( '{' . 'webhookId' . '}', - ObjectSerializer::toPathValue($webhookId), + ObjectSerializer::toPathValue($webhook_id), $resourcePath ); } @@ -601,11 +596,6 @@ protected function deleteWebhookRequest($webhookId) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -632,15 +622,15 @@ protected function deleteWebhookRequest($webhookId) * * Get a webhook details * - * @param int $webhookId Id of the webhook (required) + * @param int $webhook_id Id of the webhook (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\GetWebhook */ - public function getWebhook($webhookId) + public function getWebhook($webhook_id) { - list($response) = $this->getWebhookWithHttpInfo($webhookId); + list($response) = $this->getWebhookWithHttpInfo($webhook_id); return $response; } @@ -649,16 +639,16 @@ public function getWebhook($webhookId) * * Get a webhook details * - * @param int $webhookId Id of the webhook (required) + * @param int $webhook_id Id of the webhook (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\GetWebhook, HTTP status code, HTTP response headers (array of strings) */ - public function getWebhookWithHttpInfo($webhookId) + public function getWebhookWithHttpInfo($webhook_id) { $returnType = '\SendinBlue\Client\Model\GetWebhook'; - $request = $this->getWebhookRequest($webhookId); + $request = $this->getWebhookRequest($webhook_id); try { $options = $this->createHttpClientOption(); @@ -714,7 +704,7 @@ public function getWebhookWithHttpInfo($webhookId) ); $e->setResponseObject($data); break; - case 400: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -722,7 +712,7 @@ public function getWebhookWithHttpInfo($webhookId) ); $e->setResponseObject($data); break; - case 404: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\SendinBlue\Client\Model\ErrorModel', @@ -740,14 +730,14 @@ public function getWebhookWithHttpInfo($webhookId) * * Get a webhook details * - * @param int $webhookId Id of the webhook (required) + * @param int $webhook_id Id of the webhook (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getWebhookAsync($webhookId) + public function getWebhookAsync($webhook_id) { - return $this->getWebhookAsyncWithHttpInfo($webhookId) + return $this->getWebhookAsyncWithHttpInfo($webhook_id) ->then( function ($response) { return $response[0]; @@ -760,15 +750,15 @@ function ($response) { * * Get a webhook details * - * @param int $webhookId Id of the webhook (required) + * @param int $webhook_id Id of the webhook (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getWebhookAsyncWithHttpInfo($webhookId) + public function getWebhookAsyncWithHttpInfo($webhook_id) { $returnType = '\SendinBlue\Client\Model\GetWebhook'; - $request = $this->getWebhookRequest($webhookId); + $request = $this->getWebhookRequest($webhook_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -810,17 +800,17 @@ function ($exception) { /** * Create request for operation 'getWebhook' * - * @param int $webhookId Id of the webhook (required) + * @param int $webhook_id Id of the webhook (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getWebhookRequest($webhookId) + protected function getWebhookRequest($webhook_id) { - // verify the required parameter 'webhookId' is set - if ($webhookId === null || (is_array($webhookId) && count($webhookId) === 0)) { + // verify the required parameter 'webhook_id' is set + if ($webhook_id === null || (is_array($webhook_id) && count($webhook_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $webhookId when calling getWebhook' + 'Missing the required parameter $webhook_id when calling getWebhook' ); } @@ -833,10 +823,10 @@ protected function getWebhookRequest($webhookId) // path params - if ($webhookId !== null) { + if ($webhook_id !== null) { $resourcePath = str_replace( '{' . 'webhookId' . '}', - ObjectSerializer::toPathValue($webhookId), + ObjectSerializer::toPathValue($webhook_id), $resourcePath ); } @@ -896,11 +886,6 @@ protected function getWebhookRequest($webhookId) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1182,11 +1167,6 @@ protected function getWebhooksRequest($type = 'transactional', $sort = 'desc') if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1213,16 +1193,16 @@ protected function getWebhooksRequest($type = 'transactional', $sort = 'desc') * * Update a webhook * - * @param int $webhookId Id of the webhook (required) - * @param \SendinBlue\Client\Model\UpdateWebhook $updateWebhook Values to update a webhook (required) + * @param int $webhook_id Id of the webhook (required) + * @param \SendinBlue\Client\Model\UpdateWebhook $update_webhook Values to update a webhook (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function updateWebhook($webhookId, $updateWebhook) + public function updateWebhook($webhook_id, $update_webhook) { - $this->updateWebhookWithHttpInfo($webhookId, $updateWebhook); + $this->updateWebhookWithHttpInfo($webhook_id, $update_webhook); } /** @@ -1230,17 +1210,17 @@ public function updateWebhook($webhookId, $updateWebhook) * * Update a webhook * - * @param int $webhookId Id of the webhook (required) - * @param \SendinBlue\Client\Model\UpdateWebhook $updateWebhook Values to update a webhook (required) + * @param int $webhook_id Id of the webhook (required) + * @param \SendinBlue\Client\Model\UpdateWebhook $update_webhook Values to update a webhook (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function updateWebhookWithHttpInfo($webhookId, $updateWebhook) + public function updateWebhookWithHttpInfo($webhook_id, $update_webhook) { $returnType = ''; - $request = $this->updateWebhookRequest($webhookId, $updateWebhook); + $request = $this->updateWebhookRequest($webhook_id, $update_webhook); try { $options = $this->createHttpClientOption(); @@ -1300,15 +1280,15 @@ public function updateWebhookWithHttpInfo($webhookId, $updateWebhook) * * Update a webhook * - * @param int $webhookId Id of the webhook (required) - * @param \SendinBlue\Client\Model\UpdateWebhook $updateWebhook Values to update a webhook (required) + * @param int $webhook_id Id of the webhook (required) + * @param \SendinBlue\Client\Model\UpdateWebhook $update_webhook Values to update a webhook (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateWebhookAsync($webhookId, $updateWebhook) + public function updateWebhookAsync($webhook_id, $update_webhook) { - return $this->updateWebhookAsyncWithHttpInfo($webhookId, $updateWebhook) + return $this->updateWebhookAsyncWithHttpInfo($webhook_id, $update_webhook) ->then( function ($response) { return $response[0]; @@ -1321,16 +1301,16 @@ function ($response) { * * Update a webhook * - * @param int $webhookId Id of the webhook (required) - * @param \SendinBlue\Client\Model\UpdateWebhook $updateWebhook Values to update a webhook (required) + * @param int $webhook_id Id of the webhook (required) + * @param \SendinBlue\Client\Model\UpdateWebhook $update_webhook Values to update a webhook (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateWebhookAsyncWithHttpInfo($webhookId, $updateWebhook) + public function updateWebhookAsyncWithHttpInfo($webhook_id, $update_webhook) { $returnType = ''; - $request = $this->updateWebhookRequest($webhookId, $updateWebhook); + $request = $this->updateWebhookRequest($webhook_id, $update_webhook); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1358,24 +1338,24 @@ function ($exception) { /** * Create request for operation 'updateWebhook' * - * @param int $webhookId Id of the webhook (required) - * @param \SendinBlue\Client\Model\UpdateWebhook $updateWebhook Values to update a webhook (required) + * @param int $webhook_id Id of the webhook (required) + * @param \SendinBlue\Client\Model\UpdateWebhook $update_webhook Values to update a webhook (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function updateWebhookRequest($webhookId, $updateWebhook) + protected function updateWebhookRequest($webhook_id, $update_webhook) { - // verify the required parameter 'webhookId' is set - if ($webhookId === null || (is_array($webhookId) && count($webhookId) === 0)) { + // verify the required parameter 'webhook_id' is set + if ($webhook_id === null || (is_array($webhook_id) && count($webhook_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $webhookId when calling updateWebhook' + 'Missing the required parameter $webhook_id when calling updateWebhook' ); } - // verify the required parameter 'updateWebhook' is set - if ($updateWebhook === null || (is_array($updateWebhook) && count($updateWebhook) === 0)) { + // verify the required parameter 'update_webhook' is set + if ($update_webhook === null || (is_array($update_webhook) && count($update_webhook) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $updateWebhook when calling updateWebhook' + 'Missing the required parameter $update_webhook when calling updateWebhook' ); } @@ -1388,18 +1368,18 @@ protected function updateWebhookRequest($webhookId, $updateWebhook) // path params - if ($webhookId !== null) { + if ($webhook_id !== null) { $resourcePath = str_replace( '{' . 'webhookId' . '}', - ObjectSerializer::toPathValue($webhookId), + ObjectSerializer::toPathValue($webhook_id), $resourcePath ); } // body params $_tempBody = null; - if (isset($updateWebhook)) { - $_tempBody = $updateWebhook; + if (isset($update_webhook)) { + $_tempBody = $update_webhook; } if ($multipart) { @@ -1454,11 +1434,6 @@ protected function updateWebhookRequest($webhookId, $updateWebhook) if ($apiKey !== null) { $headers['api-key'] = $apiKey; } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); - if ($apiKey !== null) { - $headers['partner-key'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { diff --git a/lib/ApiException.php b/lib/ApiException.php index 54f6515d..2cd655e5 100644 --- a/lib/ApiException.php +++ b/lib/ApiException.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** diff --git a/lib/Configuration.php b/lib/Configuration.php index c84dccbc..70cec511 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -37,9 +37,6 @@ * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ - -$GLOBALS['version'] = '8.3.1'; - class Configuration { private static $defaultConfiguration; @@ -87,11 +84,11 @@ class Configuration protected $host = 'https://api.sendinblue.com/v3'; /** - * User agent of the HTTP request, set to "PHP-Swagger" by default + * User agent of the HTTP request, set to "PHP-SendinBlue" by default * * @var string */ - protected $userAgent = 'Swagger-Codegen/1.0.0/php'; + protected $userAgent = 'SendinBlue-Codegen/1.0.0/php'; /** * Debug switch (default set to false) @@ -120,7 +117,6 @@ class Configuration public function __construct() { $this->tempFolderPath = sys_get_temp_dir(); - $this->userAgent = 'sendinblue_clientAPI/v' . $GLOBALS['version'] . '/php'; } /** diff --git a/lib/HeaderSelector.php b/lib/HeaderSelector.php index 9a3fcee8..84360c33 100644 --- a/lib/HeaderSelector.php +++ b/lib/HeaderSelector.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -107,4 +107,3 @@ private function selectContentTypeHeader($contentType) } } } - diff --git a/lib/Model/AbTestCampaignResult.php b/lib/Model/AbTestCampaignResult.php index 4cfa4cc1..3678b337 100644 --- a/lib/Model/AbTestCampaignResult.php +++ b/lib/Model/AbTestCampaignResult.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -57,14 +57,14 @@ class AbTestCampaignResult implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'winningVersion' => 'string', - 'winningCriteria' => 'string', - 'winningSubjectLine' => 'string', - 'openRate' => 'string', - 'clickRate' => 'string', - 'winningVersionRate' => 'string', + 'winning_version' => 'string', + 'winning_criteria' => 'string', + 'winning_subject_line' => 'string', + 'open_rate' => 'string', + 'click_rate' => 'string', + 'winning_version_rate' => 'string', 'statistics' => '\SendinBlue\Client\Model\AbTestCampaignResultStatistics', - 'clickedLinks' => '\SendinBlue\Client\Model\AbTestCampaignResultClickedLinks' + 'clicked_links' => '\SendinBlue\Client\Model\AbTestCampaignResultClickedLinks' ]; /** @@ -73,14 +73,14 @@ class AbTestCampaignResult implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'winningVersion' => null, - 'winningCriteria' => null, - 'winningSubjectLine' => null, - 'openRate' => null, - 'clickRate' => null, - 'winningVersionRate' => null, + 'winning_version' => null, + 'winning_criteria' => null, + 'winning_subject_line' => null, + 'open_rate' => null, + 'click_rate' => null, + 'winning_version_rate' => null, 'statistics' => null, - 'clickedLinks' => null + 'clicked_links' => null ]; /** @@ -110,14 +110,14 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'winningVersion' => 'winningVersion', - 'winningCriteria' => 'winningCriteria', - 'winningSubjectLine' => 'winningSubjectLine', - 'openRate' => 'openRate', - 'clickRate' => 'clickRate', - 'winningVersionRate' => 'winningVersionRate', + 'winning_version' => 'winningVersion', + 'winning_criteria' => 'winningCriteria', + 'winning_subject_line' => 'winningSubjectLine', + 'open_rate' => 'openRate', + 'click_rate' => 'clickRate', + 'winning_version_rate' => 'winningVersionRate', 'statistics' => 'statistics', - 'clickedLinks' => 'clickedLinks' + 'clicked_links' => 'clickedLinks' ]; /** @@ -126,14 +126,14 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'winningVersion' => 'setWinningVersion', - 'winningCriteria' => 'setWinningCriteria', - 'winningSubjectLine' => 'setWinningSubjectLine', - 'openRate' => 'setOpenRate', - 'clickRate' => 'setClickRate', - 'winningVersionRate' => 'setWinningVersionRate', + 'winning_version' => 'setWinningVersion', + 'winning_criteria' => 'setWinningCriteria', + 'winning_subject_line' => 'setWinningSubjectLine', + 'open_rate' => 'setOpenRate', + 'click_rate' => 'setClickRate', + 'winning_version_rate' => 'setWinningVersionRate', 'statistics' => 'setStatistics', - 'clickedLinks' => 'setClickedLinks' + 'clicked_links' => 'setClickedLinks' ]; /** @@ -142,14 +142,14 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'winningVersion' => 'getWinningVersion', - 'winningCriteria' => 'getWinningCriteria', - 'winningSubjectLine' => 'getWinningSubjectLine', - 'openRate' => 'getOpenRate', - 'clickRate' => 'getClickRate', - 'winningVersionRate' => 'getWinningVersionRate', + 'winning_version' => 'getWinningVersion', + 'winning_criteria' => 'getWinningCriteria', + 'winning_subject_line' => 'getWinningSubjectLine', + 'open_rate' => 'getOpenRate', + 'click_rate' => 'getClickRate', + 'winning_version_rate' => 'getWinningVersionRate', 'statistics' => 'getStatistics', - 'clickedLinks' => 'getClickedLinks' + 'clicked_links' => 'getClickedLinks' ]; /** @@ -248,14 +248,14 @@ public function getWinningCriteriaAllowableValues() */ public function __construct(array $data = null) { - $this->container['winningVersion'] = isset($data['winningVersion']) ? $data['winningVersion'] : null; - $this->container['winningCriteria'] = isset($data['winningCriteria']) ? $data['winningCriteria'] : null; - $this->container['winningSubjectLine'] = isset($data['winningSubjectLine']) ? $data['winningSubjectLine'] : null; - $this->container['openRate'] = isset($data['openRate']) ? $data['openRate'] : null; - $this->container['clickRate'] = isset($data['clickRate']) ? $data['clickRate'] : null; - $this->container['winningVersionRate'] = isset($data['winningVersionRate']) ? $data['winningVersionRate'] : null; + $this->container['winning_version'] = isset($data['winning_version']) ? $data['winning_version'] : null; + $this->container['winning_criteria'] = isset($data['winning_criteria']) ? $data['winning_criteria'] : null; + $this->container['winning_subject_line'] = isset($data['winning_subject_line']) ? $data['winning_subject_line'] : null; + $this->container['open_rate'] = isset($data['open_rate']) ? $data['open_rate'] : null; + $this->container['click_rate'] = isset($data['click_rate']) ? $data['click_rate'] : null; + $this->container['winning_version_rate'] = isset($data['winning_version_rate']) ? $data['winning_version_rate'] : null; $this->container['statistics'] = isset($data['statistics']) ? $data['statistics'] : null; - $this->container['clickedLinks'] = isset($data['clickedLinks']) ? $data['clickedLinks'] : null; + $this->container['clicked_links'] = isset($data['clicked_links']) ? $data['clicked_links'] : null; } /** @@ -268,17 +268,17 @@ public function listInvalidProperties() $invalidProperties = []; $allowedValues = $this->getWinningVersionAllowableValues(); - if (!is_null($this->container['winningVersion']) && !in_array($this->container['winningVersion'], $allowedValues, true)) { + if (!is_null($this->container['winning_version']) && !in_array($this->container['winning_version'], $allowedValues, true)) { $invalidProperties[] = sprintf( - "invalid value for 'winningVersion', must be one of '%s'", + "invalid value for 'winning_version', must be one of '%s'", implode("', '", $allowedValues) ); } $allowedValues = $this->getWinningCriteriaAllowableValues(); - if (!is_null($this->container['winningCriteria']) && !in_array($this->container['winningCriteria'], $allowedValues, true)) { + if (!is_null($this->container['winning_criteria']) && !in_array($this->container['winning_criteria'], $allowedValues, true)) { $invalidProperties[] = sprintf( - "invalid value for 'winningCriteria', must be one of '%s'", + "invalid value for 'winning_criteria', must be one of '%s'", implode("', '", $allowedValues) ); } @@ -299,163 +299,163 @@ public function valid() /** - * Gets winningVersion + * Gets winning_version * * @return string */ public function getWinningVersion() { - return $this->container['winningVersion']; + return $this->container['winning_version']; } /** - * Sets winningVersion + * Sets winning_version * - * @param string $winningVersion Winning Campaign Info. pending = Campaign has been picked for sending and winning version is yet to be decided, tie = A tie happened between both the versions, notAvailable = Campaign has not yet been picked for sending. + * @param string $winning_version Winning Campaign Info. pending = Campaign has been picked for sending and winning version is yet to be decided, tie = A tie happened between both the versions, notAvailable = Campaign has not yet been picked for sending. * * @return $this */ - public function setWinningVersion($winningVersion) + public function setWinningVersion($winning_version) { $allowedValues = $this->getWinningVersionAllowableValues(); - if (!is_null($winningVersion) && !in_array($winningVersion, $allowedValues, true)) { + if (!is_null($winning_version) && !in_array($winning_version, $allowedValues, true)) { throw new \InvalidArgumentException( sprintf( - "Invalid value for 'winningVersion', must be one of '%s'", + "Invalid value for 'winning_version', must be one of '%s'", implode("', '", $allowedValues) ) ); } - $this->container['winningVersion'] = $winningVersion; + $this->container['winning_version'] = $winning_version; return $this; } /** - * Gets winningCriteria + * Gets winning_criteria * * @return string */ public function getWinningCriteria() { - return $this->container['winningCriteria']; + return $this->container['winning_criteria']; } /** - * Sets winningCriteria + * Sets winning_criteria * - * @param string $winningCriteria Criteria choosen for winning version (Open/Click) + * @param string $winning_criteria Criteria choosen for winning version (Open/Click) * * @return $this */ - public function setWinningCriteria($winningCriteria) + public function setWinningCriteria($winning_criteria) { $allowedValues = $this->getWinningCriteriaAllowableValues(); - if (!is_null($winningCriteria) && !in_array($winningCriteria, $allowedValues, true)) { + if (!is_null($winning_criteria) && !in_array($winning_criteria, $allowedValues, true)) { throw new \InvalidArgumentException( sprintf( - "Invalid value for 'winningCriteria', must be one of '%s'", + "Invalid value for 'winning_criteria', must be one of '%s'", implode("', '", $allowedValues) ) ); } - $this->container['winningCriteria'] = $winningCriteria; + $this->container['winning_criteria'] = $winning_criteria; return $this; } /** - * Gets winningSubjectLine + * Gets winning_subject_line * * @return string */ public function getWinningSubjectLine() { - return $this->container['winningSubjectLine']; + return $this->container['winning_subject_line']; } /** - * Sets winningSubjectLine + * Sets winning_subject_line * - * @param string $winningSubjectLine Subject Line of current winning version + * @param string $winning_subject_line Subject Line of current winning version * * @return $this */ - public function setWinningSubjectLine($winningSubjectLine) + public function setWinningSubjectLine($winning_subject_line) { - $this->container['winningSubjectLine'] = $winningSubjectLine; + $this->container['winning_subject_line'] = $winning_subject_line; return $this; } /** - * Gets openRate + * Gets open_rate * * @return string */ public function getOpenRate() { - return $this->container['openRate']; + return $this->container['open_rate']; } /** - * Sets openRate + * Sets open_rate * - * @param string $openRate Open rate for current winning version + * @param string $open_rate Open rate for current winning version * * @return $this */ - public function setOpenRate($openRate) + public function setOpenRate($open_rate) { - $this->container['openRate'] = $openRate; + $this->container['open_rate'] = $open_rate; return $this; } /** - * Gets clickRate + * Gets click_rate * * @return string */ public function getClickRate() { - return $this->container['clickRate']; + return $this->container['click_rate']; } /** - * Sets clickRate + * Sets click_rate * - * @param string $clickRate Click rate for current winning version + * @param string $click_rate Click rate for current winning version * * @return $this */ - public function setClickRate($clickRate) + public function setClickRate($click_rate) { - $this->container['clickRate'] = $clickRate; + $this->container['click_rate'] = $click_rate; return $this; } /** - * Gets winningVersionRate + * Gets winning_version_rate * * @return string */ public function getWinningVersionRate() { - return $this->container['winningVersionRate']; + return $this->container['winning_version_rate']; } /** - * Sets winningVersionRate + * Sets winning_version_rate * - * @param string $winningVersionRate Open/Click rate for the winner version + * @param string $winning_version_rate Open/Click rate for the winner version * * @return $this */ - public function setWinningVersionRate($winningVersionRate) + public function setWinningVersionRate($winning_version_rate) { - $this->container['winningVersionRate'] = $winningVersionRate; + $this->container['winning_version_rate'] = $winning_version_rate; return $this; } @@ -485,25 +485,25 @@ public function setStatistics($statistics) } /** - * Gets clickedLinks + * Gets clicked_links * * @return \SendinBlue\Client\Model\AbTestCampaignResultClickedLinks */ public function getClickedLinks() { - return $this->container['clickedLinks']; + return $this->container['clicked_links']; } /** - * Sets clickedLinks + * Sets clicked_links * - * @param \SendinBlue\Client\Model\AbTestCampaignResultClickedLinks $clickedLinks clickedLinks + * @param \SendinBlue\Client\Model\AbTestCampaignResultClickedLinks $clicked_links clicked_links * * @return $this */ - public function setClickedLinks($clickedLinks) + public function setClickedLinks($clicked_links) { - $this->container['clickedLinks'] = $clickedLinks; + $this->container['clicked_links'] = $clicked_links; return $this; } @@ -514,6 +514,7 @@ public function setClickedLinks($clickedLinks) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -526,6 +527,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -539,6 +541,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -555,6 +558,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/AbTestCampaignResultClickedLinks.php b/lib/Model/AbTestCampaignResultClickedLinks.php index b69bc36f..1960b50a 100644 --- a/lib/Model/AbTestCampaignResultClickedLinks.php +++ b/lib/Model/AbTestCampaignResultClickedLinks.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -57,8 +57,8 @@ class AbTestCampaignResultClickedLinks implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'versionA' => '\SendinBlue\Client\Model\AbTestVersionClicks', - 'versionB' => '\SendinBlue\Client\Model\AbTestVersionClicks' + 'version_a' => '\SendinBlue\Client\Model\AbTestVersionClicks', + 'version_b' => '\SendinBlue\Client\Model\AbTestVersionClicks' ]; /** @@ -67,8 +67,8 @@ class AbTestCampaignResultClickedLinks implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'versionA' => null, - 'versionB' => null + 'version_a' => null, + 'version_b' => null ]; /** @@ -98,8 +98,8 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'versionA' => 'Version A', - 'versionB' => 'Version B' + 'version_a' => 'Version A', + 'version_b' => 'Version B' ]; /** @@ -108,8 +108,8 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'versionA' => 'setVersionA', - 'versionB' => 'setVersionB' + 'version_a' => 'setVersionA', + 'version_b' => 'setVersionB' ]; /** @@ -118,8 +118,8 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'versionA' => 'getVersionA', - 'versionB' => 'getVersionB' + 'version_a' => 'getVersionA', + 'version_b' => 'getVersionB' ]; /** @@ -182,8 +182,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['versionA'] = isset($data['versionA']) ? $data['versionA'] : null; - $this->container['versionB'] = isset($data['versionB']) ? $data['versionB'] : null; + $this->container['version_a'] = isset($data['version_a']) ? $data['version_a'] : null; + $this->container['version_b'] = isset($data['version_b']) ? $data['version_b'] : null; } /** @@ -195,11 +195,11 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['versionA'] === null) { - $invalidProperties[] = "'versionA' can't be null"; + if ($this->container['version_a'] === null) { + $invalidProperties[] = "'version_a' can't be null"; } - if ($this->container['versionB'] === null) { - $invalidProperties[] = "'versionB' can't be null"; + if ($this->container['version_b'] === null) { + $invalidProperties[] = "'version_b' can't be null"; } return $invalidProperties; } @@ -217,49 +217,49 @@ public function valid() /** - * Gets versionA + * Gets version_a * * @return \SendinBlue\Client\Model\AbTestVersionClicks */ public function getVersionA() { - return $this->container['versionA']; + return $this->container['version_a']; } /** - * Sets versionA + * Sets version_a * - * @param \SendinBlue\Client\Model\AbTestVersionClicks $versionA versionA + * @param \SendinBlue\Client\Model\AbTestVersionClicks $version_a version_a * * @return $this */ - public function setVersionA($versionA) + public function setVersionA($version_a) { - $this->container['versionA'] = $versionA; + $this->container['version_a'] = $version_a; return $this; } /** - * Gets versionB + * Gets version_b * * @return \SendinBlue\Client\Model\AbTestVersionClicks */ public function getVersionB() { - return $this->container['versionB']; + return $this->container['version_b']; } /** - * Sets versionB + * Sets version_b * - * @param \SendinBlue\Client\Model\AbTestVersionClicks $versionB versionB + * @param \SendinBlue\Client\Model\AbTestVersionClicks $version_b version_b * * @return $this */ - public function setVersionB($versionB) + public function setVersionB($version_b) { - $this->container['versionB'] = $versionB; + $this->container['version_b'] = $version_b; return $this; } @@ -270,6 +270,7 @@ public function setVersionB($versionB) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -282,6 +283,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -295,6 +297,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -311,6 +314,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/AbTestCampaignResultStatistics.php b/lib/Model/AbTestCampaignResultStatistics.php index 608d6ed1..7e1bd69d 100644 --- a/lib/Model/AbTestCampaignResultStatistics.php +++ b/lib/Model/AbTestCampaignResultStatistics.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -60,8 +60,8 @@ class AbTestCampaignResultStatistics implements ModelInterface, ArrayAccess 'openers' => '\SendinBlue\Client\Model\AbTestVersionStats', 'clicks' => '\SendinBlue\Client\Model\AbTestVersionStats', 'unsubscribed' => '\SendinBlue\Client\Model\AbTestVersionStats', - 'hardBounces' => '\SendinBlue\Client\Model\AbTestVersionStats', - 'softBounces' => '\SendinBlue\Client\Model\AbTestVersionStats', + 'hard_bounces' => '\SendinBlue\Client\Model\AbTestVersionStats', + 'soft_bounces' => '\SendinBlue\Client\Model\AbTestVersionStats', 'complaints' => '\SendinBlue\Client\Model\AbTestVersionStats' ]; @@ -74,8 +74,8 @@ class AbTestCampaignResultStatistics implements ModelInterface, ArrayAccess 'openers' => null, 'clicks' => null, 'unsubscribed' => null, - 'hardBounces' => null, - 'softBounces' => null, + 'hard_bounces' => null, + 'soft_bounces' => null, 'complaints' => null ]; @@ -109,8 +109,8 @@ public static function swaggerFormats() 'openers' => 'openers', 'clicks' => 'clicks', 'unsubscribed' => 'unsubscribed', - 'hardBounces' => 'hardBounces', - 'softBounces' => 'softBounces', + 'hard_bounces' => 'hardBounces', + 'soft_bounces' => 'softBounces', 'complaints' => 'complaints' ]; @@ -123,8 +123,8 @@ public static function swaggerFormats() 'openers' => 'setOpeners', 'clicks' => 'setClicks', 'unsubscribed' => 'setUnsubscribed', - 'hardBounces' => 'setHardBounces', - 'softBounces' => 'setSoftBounces', + 'hard_bounces' => 'setHardBounces', + 'soft_bounces' => 'setSoftBounces', 'complaints' => 'setComplaints' ]; @@ -137,8 +137,8 @@ public static function swaggerFormats() 'openers' => 'getOpeners', 'clicks' => 'getClicks', 'unsubscribed' => 'getUnsubscribed', - 'hardBounces' => 'getHardBounces', - 'softBounces' => 'getSoftBounces', + 'hard_bounces' => 'getHardBounces', + 'soft_bounces' => 'getSoftBounces', 'complaints' => 'getComplaints' ]; @@ -205,8 +205,8 @@ public function __construct(array $data = null) $this->container['openers'] = isset($data['openers']) ? $data['openers'] : null; $this->container['clicks'] = isset($data['clicks']) ? $data['clicks'] : null; $this->container['unsubscribed'] = isset($data['unsubscribed']) ? $data['unsubscribed'] : null; - $this->container['hardBounces'] = isset($data['hardBounces']) ? $data['hardBounces'] : null; - $this->container['softBounces'] = isset($data['softBounces']) ? $data['softBounces'] : null; + $this->container['hard_bounces'] = isset($data['hard_bounces']) ? $data['hard_bounces'] : null; + $this->container['soft_bounces'] = isset($data['soft_bounces']) ? $data['soft_bounces'] : null; $this->container['complaints'] = isset($data['complaints']) ? $data['complaints'] : null; } @@ -228,11 +228,11 @@ public function listInvalidProperties() if ($this->container['unsubscribed'] === null) { $invalidProperties[] = "'unsubscribed' can't be null"; } - if ($this->container['hardBounces'] === null) { - $invalidProperties[] = "'hardBounces' can't be null"; + if ($this->container['hard_bounces'] === null) { + $invalidProperties[] = "'hard_bounces' can't be null"; } - if ($this->container['softBounces'] === null) { - $invalidProperties[] = "'softBounces' can't be null"; + if ($this->container['soft_bounces'] === null) { + $invalidProperties[] = "'soft_bounces' can't be null"; } if ($this->container['complaints'] === null) { $invalidProperties[] = "'complaints' can't be null"; @@ -325,49 +325,49 @@ public function setUnsubscribed($unsubscribed) } /** - * Gets hardBounces + * Gets hard_bounces * * @return \SendinBlue\Client\Model\AbTestVersionStats */ public function getHardBounces() { - return $this->container['hardBounces']; + return $this->container['hard_bounces']; } /** - * Sets hardBounces + * Sets hard_bounces * - * @param \SendinBlue\Client\Model\AbTestVersionStats $hardBounces hardBounces + * @param \SendinBlue\Client\Model\AbTestVersionStats $hard_bounces hard_bounces * * @return $this */ - public function setHardBounces($hardBounces) + public function setHardBounces($hard_bounces) { - $this->container['hardBounces'] = $hardBounces; + $this->container['hard_bounces'] = $hard_bounces; return $this; } /** - * Gets softBounces + * Gets soft_bounces * * @return \SendinBlue\Client\Model\AbTestVersionStats */ public function getSoftBounces() { - return $this->container['softBounces']; + return $this->container['soft_bounces']; } /** - * Sets softBounces + * Sets soft_bounces * - * @param \SendinBlue\Client\Model\AbTestVersionStats $softBounces softBounces + * @param \SendinBlue\Client\Model\AbTestVersionStats $soft_bounces soft_bounces * * @return $this */ - public function setSoftBounces($softBounces) + public function setSoftBounces($soft_bounces) { - $this->container['softBounces'] = $softBounces; + $this->container['soft_bounces'] = $soft_bounces; return $this; } @@ -402,6 +402,7 @@ public function setComplaints($complaints) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -414,6 +415,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -427,6 +429,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -443,6 +446,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/AbTestVersionClicks.php b/lib/Model/AbTestVersionClicks.php index 22139ae1..9557bb13 100644 --- a/lib/Model/AbTestVersionClicks.php +++ b/lib/Model/AbTestVersionClicks.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -210,6 +210,7 @@ public function valid() * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -222,6 +223,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -235,6 +237,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -251,6 +254,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/AbTestVersionClicksInner.php b/lib/Model/AbTestVersionClicksInner.php index 1903ecb7..92378fc1 100644 --- a/lib/Model/AbTestVersionClicksInner.php +++ b/lib/Model/AbTestVersionClicksInner.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -58,8 +58,8 @@ class AbTestVersionClicksInner implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'link' => 'string', - 'clicksCount' => 'float', - 'clickRate' => 'string' + 'clicks_count' => 'float', + 'click_rate' => 'string' ]; /** @@ -69,8 +69,8 @@ class AbTestVersionClicksInner implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'link' => null, - 'clicksCount' => 'int64', - 'clickRate' => null + 'clicks_count' => 'int64', + 'click_rate' => null ]; /** @@ -101,8 +101,8 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'link' => 'link', - 'clicksCount' => 'clicksCount', - 'clickRate' => 'clickRate' + 'clicks_count' => 'clicksCount', + 'click_rate' => 'clickRate' ]; /** @@ -112,8 +112,8 @@ public static function swaggerFormats() */ protected static $setters = [ 'link' => 'setLink', - 'clicksCount' => 'setClicksCount', - 'clickRate' => 'setClickRate' + 'clicks_count' => 'setClicksCount', + 'click_rate' => 'setClickRate' ]; /** @@ -123,8 +123,8 @@ public static function swaggerFormats() */ protected static $getters = [ 'link' => 'getLink', - 'clicksCount' => 'getClicksCount', - 'clickRate' => 'getClickRate' + 'clicks_count' => 'getClicksCount', + 'click_rate' => 'getClickRate' ]; /** @@ -188,8 +188,8 @@ public function getModelName() public function __construct(array $data = null) { $this->container['link'] = isset($data['link']) ? $data['link'] : null; - $this->container['clicksCount'] = isset($data['clicksCount']) ? $data['clicksCount'] : null; - $this->container['clickRate'] = isset($data['clickRate']) ? $data['clickRate'] : null; + $this->container['clicks_count'] = isset($data['clicks_count']) ? $data['clicks_count'] : null; + $this->container['click_rate'] = isset($data['click_rate']) ? $data['click_rate'] : null; } /** @@ -204,11 +204,11 @@ public function listInvalidProperties() if ($this->container['link'] === null) { $invalidProperties[] = "'link' can't be null"; } - if ($this->container['clicksCount'] === null) { - $invalidProperties[] = "'clicksCount' can't be null"; + if ($this->container['clicks_count'] === null) { + $invalidProperties[] = "'clicks_count' can't be null"; } - if ($this->container['clickRate'] === null) { - $invalidProperties[] = "'clickRate' can't be null"; + if ($this->container['click_rate'] === null) { + $invalidProperties[] = "'click_rate' can't be null"; } return $invalidProperties; } @@ -250,49 +250,49 @@ public function setLink($link) } /** - * Gets clicksCount + * Gets clicks_count * * @return float */ public function getClicksCount() { - return $this->container['clicksCount']; + return $this->container['clicks_count']; } /** - * Sets clicksCount + * Sets clicks_count * - * @param float $clicksCount Number of times a link is clicked + * @param float $clicks_count Number of times a link is clicked * * @return $this */ - public function setClicksCount($clicksCount) + public function setClicksCount($clicks_count) { - $this->container['clicksCount'] = $clicksCount; + $this->container['clicks_count'] = $clicks_count; return $this; } /** - * Gets clickRate + * Gets click_rate * * @return string */ public function getClickRate() { - return $this->container['clickRate']; + return $this->container['click_rate']; } /** - * Sets clickRate + * Sets click_rate * - * @param string $clickRate Percentage of clicks of link with respect to total clicks + * @param string $click_rate Percentage of clicks of link with respect to total clicks * * @return $this */ - public function setClickRate($clickRate) + public function setClickRate($click_rate) { - $this->container['clickRate'] = $clickRate; + $this->container['click_rate'] = $click_rate; return $this; } @@ -303,6 +303,7 @@ public function setClickRate($clickRate) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -315,6 +316,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -328,6 +330,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -344,6 +347,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/AbTestVersionStats.php b/lib/Model/AbTestVersionStats.php index 87536916..62d9cb21 100644 --- a/lib/Model/AbTestVersionStats.php +++ b/lib/Model/AbTestVersionStats.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -58,8 +58,8 @@ class AbTestVersionStats implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'versionA' => 'string', - 'versionB' => 'string' + 'version_a' => 'string', + 'version_b' => 'string' ]; /** @@ -68,8 +68,8 @@ class AbTestVersionStats implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'versionA' => null, - 'versionB' => null + 'version_a' => null, + 'version_b' => null ]; /** @@ -99,8 +99,8 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'versionA' => 'Version A', - 'versionB' => 'Version B' + 'version_a' => 'Version A', + 'version_b' => 'Version B' ]; /** @@ -109,8 +109,8 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'versionA' => 'setVersionA', - 'versionB' => 'setVersionB' + 'version_a' => 'setVersionA', + 'version_b' => 'setVersionB' ]; /** @@ -119,8 +119,8 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'versionA' => 'getVersionA', - 'versionB' => 'getVersionB' + 'version_a' => 'getVersionA', + 'version_b' => 'getVersionB' ]; /** @@ -183,8 +183,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['versionA'] = isset($data['versionA']) ? $data['versionA'] : null; - $this->container['versionB'] = isset($data['versionB']) ? $data['versionB'] : null; + $this->container['version_a'] = isset($data['version_a']) ? $data['version_a'] : null; + $this->container['version_b'] = isset($data['version_b']) ? $data['version_b'] : null; } /** @@ -196,11 +196,11 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['versionA'] === null) { - $invalidProperties[] = "'versionA' can't be null"; + if ($this->container['version_a'] === null) { + $invalidProperties[] = "'version_a' can't be null"; } - if ($this->container['versionB'] === null) { - $invalidProperties[] = "'versionB' can't be null"; + if ($this->container['version_b'] === null) { + $invalidProperties[] = "'version_b' can't be null"; } return $invalidProperties; } @@ -218,49 +218,49 @@ public function valid() /** - * Gets versionA + * Gets version_a * * @return string */ public function getVersionA() { - return $this->container['versionA']; + return $this->container['version_a']; } /** - * Sets versionA + * Sets version_a * - * @param string $versionA percentage of an event for version A + * @param string $version_a percentage of an event for version A * * @return $this */ - public function setVersionA($versionA) + public function setVersionA($version_a) { - $this->container['versionA'] = $versionA; + $this->container['version_a'] = $version_a; return $this; } /** - * Gets versionB + * Gets version_b * * @return string */ public function getVersionB() { - return $this->container['versionB']; + return $this->container['version_b']; } /** - * Sets versionB + * Sets version_b * - * @param string $versionB percentage of an event for version B + * @param string $version_b percentage of an event for version B * * @return $this */ - public function setVersionB($versionB) + public function setVersionB($version_b) { - $this->container['versionB'] = $versionB; + $this->container['version_b'] = $version_b; return $this; } @@ -271,6 +271,7 @@ public function setVersionB($versionB) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -283,6 +284,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -296,6 +298,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -312,6 +315,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/AddChildDomain.php b/lib/Model/AddChildDomain.php index 94a6321e..052fffb8 100644 --- a/lib/Model/AddChildDomain.php +++ b/lib/Model/AddChildDomain.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -234,6 +234,7 @@ public function setDomain($domain) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -246,6 +247,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -259,6 +261,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -275,6 +278,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/AddContactToList.php b/lib/Model/AddContactToList.php index 65e56498..a49d3d40 100644 --- a/lib/Model/AddContactToList.php +++ b/lib/Model/AddContactToList.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -57,8 +57,7 @@ class AddContactToList implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'emails' => 'string[]', - 'ids' => 'int[]' + 'emails' => 'string[]' ]; /** @@ -67,8 +66,7 @@ class AddContactToList implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'emails' => 'email', - 'ids' => 'int64' + 'emails' => 'email' ]; /** @@ -98,8 +96,7 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'emails' => 'emails', - 'ids' => 'ids' + 'emails' => 'emails' ]; /** @@ -108,8 +105,7 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'emails' => 'setEmails', - 'ids' => 'setIds' + 'emails' => 'setEmails' ]; /** @@ -118,8 +114,7 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'emails' => 'getEmails', - 'ids' => 'getIds' + 'emails' => 'getEmails' ]; /** @@ -183,7 +178,6 @@ public function getModelName() public function __construct(array $data = null) { $this->container['emails'] = isset($data['emails']) ? $data['emails'] : null; - $this->container['ids'] = isset($data['ids']) ? $data['ids'] : null; } /** @@ -223,7 +217,7 @@ public function getEmails() /** * Sets emails * - * @param string[] $emails Mandatory if IDs are not passed, ignored otherwise. Emails to add to a list. You can pass a maximum of 150 emails for addition in one request. If you need to add the emails in bulk, please prefer /contacts/import api. + * @param string[] $emails Emails to add to a list. You can pass a maximum of 150 emails for addition in one request. If you need to add the emails in bulk, please prefer /contacts/import api. * * @return $this */ @@ -233,30 +227,6 @@ public function setEmails($emails) return $this; } - - /** - * Gets ids - * - * @return int[] - */ - public function getIds() - { - return $this->container['ids']; - } - - /** - * Sets ids - * - * @param int[] $ids Mandatory if Emails are not passed, ignored otherwise. Emails to add to a list. You can pass a maximum of 150 emails for addition in one request. If you need to add the emails in bulk, please prefer /contacts/import api. - * - * @return $this - */ - public function setIds($ids) - { - $this->container['ids'] = $ids; - - return $this; - } /** * Returns true if offset exists. False otherwise. * @@ -264,6 +234,7 @@ public function setIds($ids) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -276,6 +247,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -289,6 +261,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -305,6 +278,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/AddCredits.php b/lib/Model/AddCredits.php index 7248ae95..62909ecc 100644 --- a/lib/Model/AddCredits.php +++ b/lib/Model/AddCredits.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -264,6 +264,7 @@ public function setEmail($email) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -276,6 +277,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -289,6 +291,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -305,6 +308,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/BlockDomain.php b/lib/Model/BlockDomain.php index f06fb03d..dcabd868 100644 --- a/lib/Model/BlockDomain.php +++ b/lib/Model/BlockDomain.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -237,6 +237,7 @@ public function setDomain($domain) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -249,6 +250,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -262,6 +264,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -278,6 +281,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/Body.php b/lib/Model/Body.php deleted file mode 100644 index ebf053d2..00000000 --- a/lib/Model/Body.php +++ /dev/null @@ -1,619 +0,0 @@ - 'string', - 'duration' => 'int', - 'taskTypeId' => 'string', - 'date' => '\DateTime', - 'notes' => 'string', - 'done' => 'bool', - 'assignToId' => 'string', - 'contactsIds' => 'int[]', - 'dealsIds' => 'string[]', - 'companiesIds' => 'string[]', - 'reminder' => '\SendinBlue\Client\Model\TaskReminder' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'name' => null, - 'duration' => 'int64', - 'taskTypeId' => null, - 'date' => 'date-time', - 'notes' => null, - 'done' => null, - 'assignToId' => null, - 'contactsIds' => null, - 'dealsIds' => null, - 'companiesIds' => null, - 'reminder' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'name' => 'name', - 'duration' => 'duration', - 'taskTypeId' => 'taskTypeId', - 'date' => 'date', - 'notes' => 'notes', - 'done' => 'done', - 'assignToId' => 'assignToId', - 'contactsIds' => 'contactsIds', - 'dealsIds' => 'dealsIds', - 'companiesIds' => 'companiesIds', - 'reminder' => 'reminder' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'name' => 'setName', - 'duration' => 'setDuration', - 'taskTypeId' => 'setTaskTypeId', - 'date' => 'setDate', - 'notes' => 'setNotes', - 'done' => 'setDone', - 'assignToId' => 'setAssignToId', - 'contactsIds' => 'setContactsIds', - 'dealsIds' => 'setDealsIds', - 'companiesIds' => 'setCompaniesIds', - 'reminder' => 'setReminder' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'name' => 'getName', - 'duration' => 'getDuration', - 'taskTypeId' => 'getTaskTypeId', - 'date' => 'getDate', - 'notes' => 'getNotes', - 'done' => 'getDone', - 'assignToId' => 'getAssignToId', - 'contactsIds' => 'getContactsIds', - 'dealsIds' => 'getDealsIds', - 'companiesIds' => 'getCompaniesIds', - 'reminder' => 'getReminder' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - $this->container['duration'] = isset($data['duration']) ? $data['duration'] : null; - $this->container['taskTypeId'] = isset($data['taskTypeId']) ? $data['taskTypeId'] : null; - $this->container['date'] = isset($data['date']) ? $data['date'] : null; - $this->container['notes'] = isset($data['notes']) ? $data['notes'] : null; - $this->container['done'] = isset($data['done']) ? $data['done'] : null; - $this->container['assignToId'] = isset($data['assignToId']) ? $data['assignToId'] : null; - $this->container['contactsIds'] = isset($data['contactsIds']) ? $data['contactsIds'] : null; - $this->container['dealsIds'] = isset($data['dealsIds']) ? $data['dealsIds'] : null; - $this->container['companiesIds'] = isset($data['companiesIds']) ? $data['companiesIds'] : null; - $this->container['reminder'] = isset($data['reminder']) ? $data['reminder'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if (!is_null($this->container['duration']) && ($this->container['duration'] < 0)) { - $invalidProperties[] = "invalid value for 'duration', must be bigger than or equal to 0."; - } - - if ($this->container['taskTypeId'] === null) { - $invalidProperties[] = "'taskTypeId' can't be null"; - } - if ($this->container['date'] === null) { - $invalidProperties[] = "'date' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name Name of task - * - * @return $this - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets duration - * - * @return int - */ - public function getDuration() - { - return $this->container['duration']; - } - - /** - * Sets duration - * - * @param int $duration Duration of task in milliseconds [1 minute = 60000 ms] - * - * @return $this - */ - public function setDuration($duration) - { - - if (!is_null($duration) && ($duration < 0)) { - throw new \InvalidArgumentException('invalid value for $duration when calling Body., must be bigger than or equal to 0.'); - } - - $this->container['duration'] = $duration; - - return $this; - } - - /** - * Gets taskTypeId - * - * @return string - */ - public function getTaskTypeId() - { - return $this->container['taskTypeId']; - } - - /** - * Sets taskTypeId - * - * @param string $taskTypeId Id for type of task e.g Call / Email / Meeting etc. - * - * @return $this - */ - public function setTaskTypeId($taskTypeId) - { - $this->container['taskTypeId'] = $taskTypeId; - - return $this; - } - - /** - * Gets date - * - * @return \DateTime - */ - public function getDate() - { - return $this->container['date']; - } - - /** - * Sets date - * - * @param \DateTime $date Task due date and time - * - * @return $this - */ - public function setDate($date) - { - $this->container['date'] = $date; - - return $this; - } - - /** - * Gets notes - * - * @return string - */ - public function getNotes() - { - return $this->container['notes']; - } - - /** - * Sets notes - * - * @param string $notes Notes added to a task - * - * @return $this - */ - public function setNotes($notes) - { - $this->container['notes'] = $notes; - - return $this; - } - - /** - * Gets done - * - * @return bool - */ - public function getDone() - { - return $this->container['done']; - } - - /** - * Sets done - * - * @param bool $done Task marked as done - * - * @return $this - */ - public function setDone($done) - { - $this->container['done'] = $done; - - return $this; - } - - /** - * Gets assignToId - * - * @return string - */ - public function getAssignToId() - { - return $this->container['assignToId']; - } - - /** - * Sets assignToId - * - * @param string $assignToId User id to whom task is assigned - * - * @return $this - */ - public function setAssignToId($assignToId) - { - $this->container['assignToId'] = $assignToId; - - return $this; - } - - /** - * Gets contactsIds - * - * @return int[] - */ - public function getContactsIds() - { - return $this->container['contactsIds']; - } - - /** - * Sets contactsIds - * - * @param int[] $contactsIds Contact ids for contacts linked to this task - * - * @return $this - */ - public function setContactsIds($contactsIds) - { - $this->container['contactsIds'] = $contactsIds; - - return $this; - } - - /** - * Gets dealsIds - * - * @return string[] - */ - public function getDealsIds() - { - return $this->container['dealsIds']; - } - - /** - * Sets dealsIds - * - * @param string[] $dealsIds Deal ids for deals a task is linked to - * - * @return $this - */ - public function setDealsIds($dealsIds) - { - $this->container['dealsIds'] = $dealsIds; - - return $this; - } - - /** - * Gets companiesIds - * - * @return string[] - */ - public function getCompaniesIds() - { - return $this->container['companiesIds']; - } - - /** - * Sets companiesIds - * - * @param string[] $companiesIds Companies ids for companies a task is linked to - * - * @return $this - */ - public function setCompaniesIds($companiesIds) - { - $this->container['companiesIds'] = $companiesIds; - - return $this; - } - - /** - * Gets reminder - * - * @return \SendinBlue\Client\Model\TaskReminder - */ - public function getReminder() - { - return $this->container['reminder']; - } - - /** - * Sets reminder - * - * @param \SendinBlue\Client\Model\TaskReminder $reminder reminder - * - * @return $this - */ - public function setReminder($reminder) - { - $this->container['reminder'] = $reminder; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/Body1.php b/lib/Model/Body1.php deleted file mode 100644 index c404f752..00000000 --- a/lib/Model/Body1.php +++ /dev/null @@ -1,610 +0,0 @@ - 'string', - 'duration' => 'int', - 'taskTypeId' => 'string', - 'date' => '\DateTime', - 'notes' => 'string', - 'done' => 'bool', - 'assignToId' => 'string', - 'contactsIds' => 'int[]', - 'dealsIds' => 'string[]', - 'companiesIds' => 'string[]', - 'reminder' => '\SendinBlue\Client\Model\TaskReminder' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'name' => null, - 'duration' => null, - 'taskTypeId' => null, - 'date' => 'date-time', - 'notes' => null, - 'done' => null, - 'assignToId' => null, - 'contactsIds' => null, - 'dealsIds' => null, - 'companiesIds' => null, - 'reminder' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'name' => 'name', - 'duration' => 'duration', - 'taskTypeId' => 'taskTypeId', - 'date' => 'date', - 'notes' => 'notes', - 'done' => 'done', - 'assignToId' => 'assignToId', - 'contactsIds' => 'contactsIds', - 'dealsIds' => 'dealsIds', - 'companiesIds' => 'companiesIds', - 'reminder' => 'reminder' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'name' => 'setName', - 'duration' => 'setDuration', - 'taskTypeId' => 'setTaskTypeId', - 'date' => 'setDate', - 'notes' => 'setNotes', - 'done' => 'setDone', - 'assignToId' => 'setAssignToId', - 'contactsIds' => 'setContactsIds', - 'dealsIds' => 'setDealsIds', - 'companiesIds' => 'setCompaniesIds', - 'reminder' => 'setReminder' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'name' => 'getName', - 'duration' => 'getDuration', - 'taskTypeId' => 'getTaskTypeId', - 'date' => 'getDate', - 'notes' => 'getNotes', - 'done' => 'getDone', - 'assignToId' => 'getAssignToId', - 'contactsIds' => 'getContactsIds', - 'dealsIds' => 'getDealsIds', - 'companiesIds' => 'getCompaniesIds', - 'reminder' => 'getReminder' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - $this->container['duration'] = isset($data['duration']) ? $data['duration'] : null; - $this->container['taskTypeId'] = isset($data['taskTypeId']) ? $data['taskTypeId'] : null; - $this->container['date'] = isset($data['date']) ? $data['date'] : null; - $this->container['notes'] = isset($data['notes']) ? $data['notes'] : null; - $this->container['done'] = isset($data['done']) ? $data['done'] : null; - $this->container['assignToId'] = isset($data['assignToId']) ? $data['assignToId'] : null; - $this->container['contactsIds'] = isset($data['contactsIds']) ? $data['contactsIds'] : null; - $this->container['dealsIds'] = isset($data['dealsIds']) ? $data['dealsIds'] : null; - $this->container['companiesIds'] = isset($data['companiesIds']) ? $data['companiesIds'] : null; - $this->container['reminder'] = isset($data['reminder']) ? $data['reminder'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ($this->container['taskTypeId'] === null) { - $invalidProperties[] = "'taskTypeId' can't be null"; - } - if ($this->container['date'] === null) { - $invalidProperties[] = "'date' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name Name of task - * - * @return $this - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets duration - * - * @return int - */ - public function getDuration() - { - return $this->container['duration']; - } - - /** - * Sets duration - * - * @param int $duration Duration of task in milliseconds [1 minute = 60000 ms] - * - * @return $this - */ - public function setDuration($duration) - { - $this->container['duration'] = $duration; - - return $this; - } - - /** - * Gets taskTypeId - * - * @return string - */ - public function getTaskTypeId() - { - return $this->container['taskTypeId']; - } - - /** - * Sets taskTypeId - * - * @param string $taskTypeId Id for type of task e.g Call / Email / Meeting etc. - * - * @return $this - */ - public function setTaskTypeId($taskTypeId) - { - $this->container['taskTypeId'] = $taskTypeId; - - return $this; - } - - /** - * Gets date - * - * @return \DateTime - */ - public function getDate() - { - return $this->container['date']; - } - - /** - * Sets date - * - * @param \DateTime $date Task date/time - * - * @return $this - */ - public function setDate($date) - { - $this->container['date'] = $date; - - return $this; - } - - /** - * Gets notes - * - * @return string - */ - public function getNotes() - { - return $this->container['notes']; - } - - /** - * Sets notes - * - * @param string $notes Notes added to a task - * - * @return $this - */ - public function setNotes($notes) - { - $this->container['notes'] = $notes; - - return $this; - } - - /** - * Gets done - * - * @return bool - */ - public function getDone() - { - return $this->container['done']; - } - - /** - * Sets done - * - * @param bool $done Task marked as done - * - * @return $this - */ - public function setDone($done) - { - $this->container['done'] = $done; - - return $this; - } - - /** - * Gets assignToId - * - * @return string - */ - public function getAssignToId() - { - return $this->container['assignToId']; - } - - /** - * Sets assignToId - * - * @param string $assignToId User id to whom task is assigned - * - * @return $this - */ - public function setAssignToId($assignToId) - { - $this->container['assignToId'] = $assignToId; - - return $this; - } - - /** - * Gets contactsIds - * - * @return int[] - */ - public function getContactsIds() - { - return $this->container['contactsIds']; - } - - /** - * Sets contactsIds - * - * @param int[] $contactsIds Contact ids for contacts linked to this task - * - * @return $this - */ - public function setContactsIds($contactsIds) - { - $this->container['contactsIds'] = $contactsIds; - - return $this; - } - - /** - * Gets dealsIds - * - * @return string[] - */ - public function getDealsIds() - { - return $this->container['dealsIds']; - } - - /** - * Sets dealsIds - * - * @param string[] $dealsIds Deal ids for deals a task is linked to - * - * @return $this - */ - public function setDealsIds($dealsIds) - { - $this->container['dealsIds'] = $dealsIds; - - return $this; - } - - /** - * Gets companiesIds - * - * @return string[] - */ - public function getCompaniesIds() - { - return $this->container['companiesIds']; - } - - /** - * Sets companiesIds - * - * @param string[] $companiesIds Companies ids for companies a task is linked to - * - * @return $this - */ - public function setCompaniesIds($companiesIds) - { - $this->container['companiesIds'] = $companiesIds; - - return $this; - } - - /** - * Gets reminder - * - * @return \SendinBlue\Client\Model\TaskReminder - */ - public function getReminder() - { - return $this->container['reminder']; - } - - /** - * Sets reminder - * - * @param \SendinBlue\Client\Model\TaskReminder $reminder reminder - * - * @return $this - */ - public function setReminder($reminder) - { - $this->container['reminder'] = $reminder; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/Contact.php b/lib/Model/Contact.php deleted file mode 100644 index 3baf4ab7..00000000 --- a/lib/Model/Contact.php +++ /dev/null @@ -1,518 +0,0 @@ - 'object', - 'email' => 'string', - 'assignToId' => 'string', - 'contactsId' => 'int', - 'crmLists' => 'object', - 'attributes' => 'object', - 'createdAt' => '\DateTime', - 'updatedAt' => '\DateTime' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'virtualNextTask' => null, - 'email' => null, - 'assignToId' => null, - 'contactsId' => null, - 'crmLists' => null, - 'attributes' => null, - 'createdAt' => 'date-time', - 'updatedAt' => 'date-time' - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'virtualNextTask' => 'virtualNextTask', - 'email' => 'email', - 'assignToId' => 'assignToId', - 'contactsId' => 'contactsId', - 'crmLists' => 'crmLists', - 'attributes' => 'attributes', - 'createdAt' => 'createdAt', - 'updatedAt' => 'updatedAt' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'virtualNextTask' => 'setVirtualNextTask', - 'email' => 'setEmail', - 'assignToId' => 'setAssignToId', - 'contactsId' => 'setContactsId', - 'crmLists' => 'setCrmLists', - 'attributes' => 'setAttributes', - 'createdAt' => 'setCreatedAt', - 'updatedAt' => 'setUpdatedAt' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'virtualNextTask' => 'getVirtualNextTask', - 'email' => 'getEmail', - 'assignToId' => 'getAssignToId', - 'contactsId' => 'getContactsId', - 'crmLists' => 'getCrmLists', - 'attributes' => 'getAttributes', - 'createdAt' => 'getCreatedAt', - 'updatedAt' => 'getUpdatedAt' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['virtualNextTask'] = isset($data['virtualNextTask']) ? $data['virtualNextTask'] : null; - $this->container['email'] = isset($data['email']) ? $data['email'] : null; - $this->container['assignToId'] = isset($data['assignToId']) ? $data['assignToId'] : null; - $this->container['contactsId'] = isset($data['contactsId']) ? $data['contactsId'] : null; - $this->container['crmLists'] = isset($data['crmLists']) ? $data['crmLists'] : null; - $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; - $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; - $this->container['updatedAt'] = isset($data['updatedAt']) ? $data['updatedAt'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['email'] === null) { - $invalidProperties[] = "'email' can't be null"; - } - if ($this->container['crmLists'] === null) { - $invalidProperties[] = "'crmLists' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets virtualNextTask - * - * @return object - */ - public function getVirtualNextTask() - { - return $this->container['virtualNextTask']; - } - - /** - * Sets virtualNextTask - * - * @param object $virtualNextTask Next incomplete task of contact - * - * @return $this - */ - public function setVirtualNextTask($virtualNextTask) - { - $this->container['virtualNextTask'] = $virtualNextTask; - - return $this; - } - - /** - * Gets email - * - * @return string - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string $email Contact email - * - * @return $this - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets assignToId - * - * @return string - */ - public function getAssignToId() - { - return $this->container['assignToId']; - } - - /** - * Sets assignToId - * - * @param string $assignToId User id to whom contact is assigned - * - * @return $this - */ - public function setAssignToId($assignToId) - { - $this->container['assignToId'] = $assignToId; - - return $this; - } - - /** - * Gets contactsId - * - * @return int - */ - public function getContactsId() - { - return $this->container['contactsId']; - } - - /** - * Sets contactsId - * - * @param int $contactsId Contact id - * - * @return $this - */ - public function setContactsId($contactsId) - { - $this->container['contactsId'] = $contactsId; - - return $this; - } - - /** - * Gets crmLists - * - * @return object - */ - public function getCrmLists() - { - return $this->container['crmLists']; - } - - /** - * Sets crmLists - * - * @param object $crmLists CRM lists in which contact is added - * - * @return $this - */ - public function setCrmLists($crmLists) - { - $this->container['crmLists'] = $crmLists; - - return $this; - } - - /** - * Gets attributes - * - * @return object - */ - public function getAttributes() - { - return $this->container['attributes']; - } - - /** - * Sets attributes - * - * @param object $attributes Contact attributes e.g firstname / lastname / SMS etc. - * - * @return $this - */ - public function setAttributes($attributes) - { - $this->container['attributes'] = $attributes; - - return $this; - } - - /** - * Gets createdAt - * - * @return \DateTime - */ - public function getCreatedAt() - { - return $this->container['createdAt']; - } - - /** - * Sets createdAt - * - * @param \DateTime $createdAt Contact created date/time - * - * @return $this - */ - public function setCreatedAt($createdAt) - { - $this->container['createdAt'] = $createdAt; - - return $this; - } - - /** - * Gets updatedAt - * - * @return \DateTime - */ - public function getUpdatedAt() - { - return $this->container['updatedAt']; - } - - /** - * Sets updatedAt - * - * @param \DateTime $updatedAt Contact updated date/time - * - * @return $this - */ - public function setUpdatedAt($updatedAt) - { - $this->container['updatedAt'] = $updatedAt; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/CreateAttribute.php b/lib/Model/CreateAttribute.php index 66aa7c38..98067a39 100644 --- a/lib/Model/CreateAttribute.php +++ b/lib/Model/CreateAttribute.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -334,6 +334,7 @@ public function setType($type) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -346,6 +347,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -359,6 +361,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -375,6 +378,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/CreateAttributeEnumeration.php b/lib/Model/CreateAttributeEnumeration.php index 16eeb4a2..82cb8f79 100644 --- a/lib/Model/CreateAttributeEnumeration.php +++ b/lib/Model/CreateAttributeEnumeration.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -270,6 +270,7 @@ public function setLabel($label) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -282,6 +283,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -295,6 +297,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -311,6 +314,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/CreateChild.php b/lib/Model/CreateChild.php index 00a3a1c1..1e485d57 100644 --- a/lib/Model/CreateChild.php +++ b/lib/Model/CreateChild.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -58,9 +58,9 @@ class CreateChild implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'email' => 'string', - 'firstName' => 'string', - 'lastName' => 'string', - 'companyName' => 'string', + 'first_name' => 'string', + 'last_name' => 'string', + 'company_name' => 'string', 'password' => 'string', 'language' => 'string' ]; @@ -72,9 +72,9 @@ class CreateChild implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'email' => 'email', - 'firstName' => null, - 'lastName' => null, - 'companyName' => null, + 'first_name' => null, + 'last_name' => null, + 'company_name' => null, 'password' => 'password', 'language' => null ]; @@ -107,9 +107,9 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'email' => 'email', - 'firstName' => 'firstName', - 'lastName' => 'lastName', - 'companyName' => 'companyName', + 'first_name' => 'firstName', + 'last_name' => 'lastName', + 'company_name' => 'companyName', 'password' => 'password', 'language' => 'language' ]; @@ -121,9 +121,9 @@ public static function swaggerFormats() */ protected static $setters = [ 'email' => 'setEmail', - 'firstName' => 'setFirstName', - 'lastName' => 'setLastName', - 'companyName' => 'setCompanyName', + 'first_name' => 'setFirstName', + 'last_name' => 'setLastName', + 'company_name' => 'setCompanyName', 'password' => 'setPassword', 'language' => 'setLanguage' ]; @@ -135,9 +135,9 @@ public static function swaggerFormats() */ protected static $getters = [ 'email' => 'getEmail', - 'firstName' => 'getFirstName', - 'lastName' => 'getLastName', - 'companyName' => 'getCompanyName', + 'first_name' => 'getFirstName', + 'last_name' => 'getLastName', + 'company_name' => 'getCompanyName', 'password' => 'getPassword', 'language' => 'getLanguage' ]; @@ -226,9 +226,9 @@ public function getLanguageAllowableValues() public function __construct(array $data = null) { $this->container['email'] = isset($data['email']) ? $data['email'] : null; - $this->container['firstName'] = isset($data['firstName']) ? $data['firstName'] : null; - $this->container['lastName'] = isset($data['lastName']) ? $data['lastName'] : null; - $this->container['companyName'] = isset($data['companyName']) ? $data['companyName'] : null; + $this->container['first_name'] = isset($data['first_name']) ? $data['first_name'] : null; + $this->container['last_name'] = isset($data['last_name']) ? $data['last_name'] : null; + $this->container['company_name'] = isset($data['company_name']) ? $data['company_name'] : null; $this->container['password'] = isset($data['password']) ? $data['password'] : null; $this->container['language'] = isset($data['language']) ? $data['language'] : null; } @@ -245,14 +245,14 @@ public function listInvalidProperties() if ($this->container['email'] === null) { $invalidProperties[] = "'email' can't be null"; } - if ($this->container['firstName'] === null) { - $invalidProperties[] = "'firstName' can't be null"; + if ($this->container['first_name'] === null) { + $invalidProperties[] = "'first_name' can't be null"; } - if ($this->container['lastName'] === null) { - $invalidProperties[] = "'lastName' can't be null"; + if ($this->container['last_name'] === null) { + $invalidProperties[] = "'last_name' can't be null"; } - if ($this->container['companyName'] === null) { - $invalidProperties[] = "'companyName' can't be null"; + if ($this->container['company_name'] === null) { + $invalidProperties[] = "'company_name' can't be null"; } if ($this->container['password'] === null) { $invalidProperties[] = "'password' can't be null"; @@ -305,73 +305,73 @@ public function setEmail($email) } /** - * Gets firstName + * Gets first_name * * @return string */ public function getFirstName() { - return $this->container['firstName']; + return $this->container['first_name']; } /** - * Sets firstName + * Sets first_name * - * @param string $firstName First name to use to create the child account + * @param string $first_name First name to use to create the child account * * @return $this */ - public function setFirstName($firstName) + public function setFirstName($first_name) { - $this->container['firstName'] = $firstName; + $this->container['first_name'] = $first_name; return $this; } /** - * Gets lastName + * Gets last_name * * @return string */ public function getLastName() { - return $this->container['lastName']; + return $this->container['last_name']; } /** - * Sets lastName + * Sets last_name * - * @param string $lastName Last name to use to create the child account + * @param string $last_name Last name to use to create the child account * * @return $this */ - public function setLastName($lastName) + public function setLastName($last_name) { - $this->container['lastName'] = $lastName; + $this->container['last_name'] = $last_name; return $this; } /** - * Gets companyName + * Gets company_name * * @return string */ public function getCompanyName() { - return $this->container['companyName']; + return $this->container['company_name']; } /** - * Sets companyName + * Sets company_name * - * @param string $companyName Company name to use to create the child account + * @param string $company_name Company name to use to create the child account * * @return $this */ - public function setCompanyName($companyName) + public function setCompanyName($company_name) { - $this->container['companyName'] = $companyName; + $this->container['company_name'] = $company_name; return $this; } @@ -439,6 +439,7 @@ public function setLanguage($language) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -451,6 +452,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -464,6 +466,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -480,6 +483,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/CreateContact.php b/lib/Model/CreateContact.php index 7fd587bc..4df4092e 100644 --- a/lib/Model/CreateContact.php +++ b/lib/Model/CreateContact.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class CreateContact implements ModelInterface, ArrayAccess protected static $swaggerTypes = [ 'email' => 'string', 'attributes' => 'object', - 'emailBlacklisted' => 'bool', - 'smsBlacklisted' => 'bool', - 'listIds' => 'int[]', - 'updateEnabled' => 'bool', - 'smtpBlacklistSender' => 'string[]' + 'email_blacklisted' => 'bool', + 'sms_blacklisted' => 'bool', + 'list_ids' => 'int[]', + 'update_enabled' => 'bool', + 'smtp_blacklist_sender' => 'string[]' ]; /** @@ -74,11 +74,11 @@ class CreateContact implements ModelInterface, ArrayAccess protected static $swaggerFormats = [ 'email' => 'email', 'attributes' => null, - 'emailBlacklisted' => null, - 'smsBlacklisted' => null, - 'listIds' => 'int64', - 'updateEnabled' => null, - 'smtpBlacklistSender' => 'email' + 'email_blacklisted' => null, + 'sms_blacklisted' => null, + 'list_ids' => 'int64', + 'update_enabled' => null, + 'smtp_blacklist_sender' => 'email' ]; /** @@ -110,11 +110,11 @@ public static function swaggerFormats() protected static $attributeMap = [ 'email' => 'email', 'attributes' => 'attributes', - 'emailBlacklisted' => 'emailBlacklisted', - 'smsBlacklisted' => 'smsBlacklisted', - 'listIds' => 'listIds', - 'updateEnabled' => 'updateEnabled', - 'smtpBlacklistSender' => 'smtpBlacklistSender' + 'email_blacklisted' => 'emailBlacklisted', + 'sms_blacklisted' => 'smsBlacklisted', + 'list_ids' => 'listIds', + 'update_enabled' => 'updateEnabled', + 'smtp_blacklist_sender' => 'smtpBlacklistSender' ]; /** @@ -125,11 +125,11 @@ public static function swaggerFormats() protected static $setters = [ 'email' => 'setEmail', 'attributes' => 'setAttributes', - 'emailBlacklisted' => 'setEmailBlacklisted', - 'smsBlacklisted' => 'setSmsBlacklisted', - 'listIds' => 'setListIds', - 'updateEnabled' => 'setUpdateEnabled', - 'smtpBlacklistSender' => 'setSmtpBlacklistSender' + 'email_blacklisted' => 'setEmailBlacklisted', + 'sms_blacklisted' => 'setSmsBlacklisted', + 'list_ids' => 'setListIds', + 'update_enabled' => 'setUpdateEnabled', + 'smtp_blacklist_sender' => 'setSmtpBlacklistSender' ]; /** @@ -140,11 +140,11 @@ public static function swaggerFormats() protected static $getters = [ 'email' => 'getEmail', 'attributes' => 'getAttributes', - 'emailBlacklisted' => 'getEmailBlacklisted', - 'smsBlacklisted' => 'getSmsBlacklisted', - 'listIds' => 'getListIds', - 'updateEnabled' => 'getUpdateEnabled', - 'smtpBlacklistSender' => 'getSmtpBlacklistSender' + 'email_blacklisted' => 'getEmailBlacklisted', + 'sms_blacklisted' => 'getSmsBlacklisted', + 'list_ids' => 'getListIds', + 'update_enabled' => 'getUpdateEnabled', + 'smtp_blacklist_sender' => 'getSmtpBlacklistSender' ]; /** @@ -209,11 +209,11 @@ public function __construct(array $data = null) { $this->container['email'] = isset($data['email']) ? $data['email'] : null; $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; - $this->container['emailBlacklisted'] = isset($data['emailBlacklisted']) ? $data['emailBlacklisted'] : null; - $this->container['smsBlacklisted'] = isset($data['smsBlacklisted']) ? $data['smsBlacklisted'] : null; - $this->container['listIds'] = isset($data['listIds']) ? $data['listIds'] : null; - $this->container['updateEnabled'] = isset($data['updateEnabled']) ? $data['updateEnabled'] : false; - $this->container['smtpBlacklistSender'] = isset($data['smtpBlacklistSender']) ? $data['smtpBlacklistSender'] : null; + $this->container['email_blacklisted'] = isset($data['email_blacklisted']) ? $data['email_blacklisted'] : null; + $this->container['sms_blacklisted'] = isset($data['sms_blacklisted']) ? $data['sms_blacklisted'] : null; + $this->container['list_ids'] = isset($data['list_ids']) ? $data['list_ids'] : null; + $this->container['update_enabled'] = isset($data['update_enabled']) ? $data['update_enabled'] : false; + $this->container['smtp_blacklist_sender'] = isset($data['smtp_blacklist_sender']) ? $data['smtp_blacklist_sender'] : null; } /** @@ -277,7 +277,7 @@ public function getAttributes() /** * Sets attributes * - * @param object $attributes Pass the set of attributes and their values. The attribute's parameter should be passed in capital letter while creating a contact. These attributes must be present in your SendinBlue account. For eg. {\"FNAME\":\"Elly\", \"LNAME\":\"Roger\"} + * @param object $attributes Pass the set of attributes and their values. These attributes must be present in your SendinBlue account. For eg. {\"FNAME\":\"Elly\", \"LNAME\":\"Roger\"} * * @return $this */ @@ -289,121 +289,121 @@ public function setAttributes($attributes) } /** - * Gets emailBlacklisted + * Gets email_blacklisted * * @return bool */ public function getEmailBlacklisted() { - return $this->container['emailBlacklisted']; + return $this->container['email_blacklisted']; } /** - * Sets emailBlacklisted + * Sets email_blacklisted * - * @param bool $emailBlacklisted Set this field to blacklist the contact for emails (emailBlacklisted = true) + * @param bool $email_blacklisted Set this field to blacklist the contact for emails (emailBlacklisted = true) * * @return $this */ - public function setEmailBlacklisted($emailBlacklisted) + public function setEmailBlacklisted($email_blacklisted) { - $this->container['emailBlacklisted'] = $emailBlacklisted; + $this->container['email_blacklisted'] = $email_blacklisted; return $this; } /** - * Gets smsBlacklisted + * Gets sms_blacklisted * * @return bool */ public function getSmsBlacklisted() { - return $this->container['smsBlacklisted']; + return $this->container['sms_blacklisted']; } /** - * Sets smsBlacklisted + * Sets sms_blacklisted * - * @param bool $smsBlacklisted Set this field to blacklist the contact for SMS (smsBlacklisted = true) + * @param bool $sms_blacklisted Set this field to blacklist the contact for SMS (smsBlacklisted = true) * * @return $this */ - public function setSmsBlacklisted($smsBlacklisted) + public function setSmsBlacklisted($sms_blacklisted) { - $this->container['smsBlacklisted'] = $smsBlacklisted; + $this->container['sms_blacklisted'] = $sms_blacklisted; return $this; } /** - * Gets listIds + * Gets list_ids * * @return int[] */ public function getListIds() { - return $this->container['listIds']; + return $this->container['list_ids']; } /** - * Sets listIds + * Sets list_ids * - * @param int[] $listIds Ids of the lists to add the contact to + * @param int[] $list_ids Ids of the lists to add the contact to * * @return $this */ - public function setListIds($listIds) + public function setListIds($list_ids) { - $this->container['listIds'] = $listIds; + $this->container['list_ids'] = $list_ids; return $this; } /** - * Gets updateEnabled + * Gets update_enabled * * @return bool */ public function getUpdateEnabled() { - return $this->container['updateEnabled']; + return $this->container['update_enabled']; } /** - * Sets updateEnabled + * Sets update_enabled * - * @param bool $updateEnabled Facilitate to update the existing contact in the same request (updateEnabled = true) + * @param bool $update_enabled Facilitate to update the existing contact in the same request (updateEnabled = true) * * @return $this */ - public function setUpdateEnabled($updateEnabled) + public function setUpdateEnabled($update_enabled) { - $this->container['updateEnabled'] = $updateEnabled; + $this->container['update_enabled'] = $update_enabled; return $this; } /** - * Gets smtpBlacklistSender + * Gets smtp_blacklist_sender * * @return string[] */ public function getSmtpBlacklistSender() { - return $this->container['smtpBlacklistSender']; + return $this->container['smtp_blacklist_sender']; } /** - * Sets smtpBlacklistSender + * Sets smtp_blacklist_sender * - * @param string[] $smtpBlacklistSender transactional email forbidden sender for contact. Use only for email Contact ( only available if updateEnabled = true ) + * @param string[] $smtp_blacklist_sender transactional email forbidden sender for contact. Use only for email Contact ( only available if updateEnabled = true ) * * @return $this */ - public function setSmtpBlacklistSender($smtpBlacklistSender) + public function setSmtpBlacklistSender($smtp_blacklist_sender) { - $this->container['smtpBlacklistSender'] = $smtpBlacklistSender; + $this->container['smtp_blacklist_sender'] = $smtp_blacklist_sender; return $this; } @@ -414,6 +414,7 @@ public function setSmtpBlacklistSender($smtpBlacklistSender) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -426,6 +427,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -439,6 +441,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -455,6 +458,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/CreateDoiContact.php b/lib/Model/CreateDoiContact.php index 11925702..e1b29b97 100644 --- a/lib/Model/CreateDoiContact.php +++ b/lib/Model/CreateDoiContact.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -59,10 +59,10 @@ class CreateDoiContact implements ModelInterface, ArrayAccess protected static $swaggerTypes = [ 'email' => 'string', 'attributes' => 'object', - 'includeListIds' => 'int[]', - 'excludeListIds' => 'int[]', - 'templateId' => 'int', - 'redirectionUrl' => 'string' + 'include_list_ids' => 'int[]', + 'exclude_list_ids' => 'int[]', + 'template_id' => 'int', + 'redirection_url' => 'string' ]; /** @@ -73,10 +73,10 @@ class CreateDoiContact implements ModelInterface, ArrayAccess protected static $swaggerFormats = [ 'email' => 'email', 'attributes' => null, - 'includeListIds' => 'int64', - 'excludeListIds' => 'int64', - 'templateId' => 'int64', - 'redirectionUrl' => 'url' + 'include_list_ids' => 'int64', + 'exclude_list_ids' => 'int64', + 'template_id' => 'int64', + 'redirection_url' => 'url' ]; /** @@ -108,10 +108,10 @@ public static function swaggerFormats() protected static $attributeMap = [ 'email' => 'email', 'attributes' => 'attributes', - 'includeListIds' => 'includeListIds', - 'excludeListIds' => 'excludeListIds', - 'templateId' => 'templateId', - 'redirectionUrl' => 'redirectionUrl' + 'include_list_ids' => 'includeListIds', + 'exclude_list_ids' => 'excludeListIds', + 'template_id' => 'templateId', + 'redirection_url' => 'redirectionUrl' ]; /** @@ -122,10 +122,10 @@ public static function swaggerFormats() protected static $setters = [ 'email' => 'setEmail', 'attributes' => 'setAttributes', - 'includeListIds' => 'setIncludeListIds', - 'excludeListIds' => 'setExcludeListIds', - 'templateId' => 'setTemplateId', - 'redirectionUrl' => 'setRedirectionUrl' + 'include_list_ids' => 'setIncludeListIds', + 'exclude_list_ids' => 'setExcludeListIds', + 'template_id' => 'setTemplateId', + 'redirection_url' => 'setRedirectionUrl' ]; /** @@ -136,10 +136,10 @@ public static function swaggerFormats() protected static $getters = [ 'email' => 'getEmail', 'attributes' => 'getAttributes', - 'includeListIds' => 'getIncludeListIds', - 'excludeListIds' => 'getExcludeListIds', - 'templateId' => 'getTemplateId', - 'redirectionUrl' => 'getRedirectionUrl' + 'include_list_ids' => 'getIncludeListIds', + 'exclude_list_ids' => 'getExcludeListIds', + 'template_id' => 'getTemplateId', + 'redirection_url' => 'getRedirectionUrl' ]; /** @@ -204,10 +204,10 @@ public function __construct(array $data = null) { $this->container['email'] = isset($data['email']) ? $data['email'] : null; $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; - $this->container['includeListIds'] = isset($data['includeListIds']) ? $data['includeListIds'] : null; - $this->container['excludeListIds'] = isset($data['excludeListIds']) ? $data['excludeListIds'] : null; - $this->container['templateId'] = isset($data['templateId']) ? $data['templateId'] : null; - $this->container['redirectionUrl'] = isset($data['redirectionUrl']) ? $data['redirectionUrl'] : null; + $this->container['include_list_ids'] = isset($data['include_list_ids']) ? $data['include_list_ids'] : null; + $this->container['exclude_list_ids'] = isset($data['exclude_list_ids']) ? $data['exclude_list_ids'] : null; + $this->container['template_id'] = isset($data['template_id']) ? $data['template_id'] : null; + $this->container['redirection_url'] = isset($data['redirection_url']) ? $data['redirection_url'] : null; } /** @@ -222,14 +222,14 @@ public function listInvalidProperties() if ($this->container['email'] === null) { $invalidProperties[] = "'email' can't be null"; } - if ($this->container['includeListIds'] === null) { - $invalidProperties[] = "'includeListIds' can't be null"; + if ($this->container['include_list_ids'] === null) { + $invalidProperties[] = "'include_list_ids' can't be null"; } - if ($this->container['templateId'] === null) { - $invalidProperties[] = "'templateId' can't be null"; + if ($this->container['template_id'] === null) { + $invalidProperties[] = "'template_id' can't be null"; } - if ($this->container['redirectionUrl'] === null) { - $invalidProperties[] = "'redirectionUrl' can't be null"; + if ($this->container['redirection_url'] === null) { + $invalidProperties[] = "'redirection_url' can't be null"; } return $invalidProperties; } @@ -295,97 +295,97 @@ public function setAttributes($attributes) } /** - * Gets includeListIds + * Gets include_list_ids * * @return int[] */ public function getIncludeListIds() { - return $this->container['includeListIds']; + return $this->container['include_list_ids']; } /** - * Sets includeListIds + * Sets include_list_ids * - * @param int[] $includeListIds Lists under user account where contact should be added + * @param int[] $include_list_ids Lists under user account where contact should be added * * @return $this */ - public function setIncludeListIds($includeListIds) + public function setIncludeListIds($include_list_ids) { - $this->container['includeListIds'] = $includeListIds; + $this->container['include_list_ids'] = $include_list_ids; return $this; } /** - * Gets excludeListIds + * Gets exclude_list_ids * * @return int[] */ public function getExcludeListIds() { - return $this->container['excludeListIds']; + return $this->container['exclude_list_ids']; } /** - * Sets excludeListIds + * Sets exclude_list_ids * - * @param int[] $excludeListIds Lists under user account where contact should not be added + * @param int[] $exclude_list_ids Lists under user account where contact should not be added * * @return $this */ - public function setExcludeListIds($excludeListIds) + public function setExcludeListIds($exclude_list_ids) { - $this->container['excludeListIds'] = $excludeListIds; + $this->container['exclude_list_ids'] = $exclude_list_ids; return $this; } /** - * Gets templateId + * Gets template_id * * @return int */ public function getTemplateId() { - return $this->container['templateId']; + return $this->container['template_id']; } /** - * Sets templateId + * Sets template_id * - * @param int $templateId Id of the Double opt-in (DOI) template + * @param int $template_id Id of the Double opt-in (DOI) template * * @return $this */ - public function setTemplateId($templateId) + public function setTemplateId($template_id) { - $this->container['templateId'] = $templateId; + $this->container['template_id'] = $template_id; return $this; } /** - * Gets redirectionUrl + * Gets redirection_url * * @return string */ public function getRedirectionUrl() { - return $this->container['redirectionUrl']; + return $this->container['redirection_url']; } /** - * Sets redirectionUrl + * Sets redirection_url * - * @param string $redirectionUrl URL of the web page that user will be redirected to after clicking on the double opt in URL. When editing your DOI template you can reference this URL by using the tag {{ params.DOIurl }}. + * @param string $redirection_url URL of the web page that user will be redirected to after clicking on the double opt in URL. When editing your DOI template you can reference this URL by using the tag {{ params.DOIurl }}. * * @return $this */ - public function setRedirectionUrl($redirectionUrl) + public function setRedirectionUrl($redirection_url) { - $this->container['redirectionUrl'] = $redirectionUrl; + $this->container['redirection_url'] = $redirection_url; return $this; } @@ -396,6 +396,7 @@ public function setRedirectionUrl($redirectionUrl) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -408,6 +409,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -421,6 +423,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -437,6 +440,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/CreateEmailCampaign.php b/lib/Model/CreateEmailCampaign.php index 4d6a075d..925fb5fb 100644 --- a/lib/Model/CreateEmailCampaign.php +++ b/lib/Model/CreateEmailCampaign.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -60,31 +60,31 @@ class CreateEmailCampaign implements ModelInterface, ArrayAccess 'tag' => 'string', 'sender' => '\SendinBlue\Client\Model\CreateEmailCampaignSender', 'name' => 'string', - 'htmlContent' => 'string', - 'htmlUrl' => 'string', - 'templateId' => 'int', - 'scheduledAt' => 'string', + 'html_content' => 'string', + 'html_url' => 'string', + 'template_id' => 'int', + 'scheduled_at' => '\DateTime', 'subject' => 'string', - 'replyTo' => 'string', - 'toField' => 'string', + 'reply_to' => 'string', + 'to_field' => 'string', 'recipients' => '\SendinBlue\Client\Model\CreateEmailCampaignRecipients', - 'attachmentUrl' => 'string', - 'inlineImageActivation' => 'bool', - 'mirrorActive' => 'bool', + 'attachment_url' => 'string', + 'inline_image_activation' => 'bool', + 'mirror_active' => 'bool', 'footer' => 'string', 'header' => 'string', - 'utmCampaign' => 'string', + 'utm_campaign' => 'string', 'params' => 'object', - 'sendAtBestTime' => 'bool', - 'abTesting' => 'bool', - 'subjectA' => 'string', - 'subjectB' => 'string', - 'splitRule' => 'int', - 'winnerCriteria' => 'string', - 'winnerDelay' => 'int', - 'ipWarmupEnable' => 'bool', - 'initialQuota' => 'int', - 'increaseRate' => 'int' + 'send_at_best_time' => 'bool', + 'ab_testing' => 'bool', + 'subject_a' => 'string', + 'subject_b' => 'string', + 'split_rule' => 'int', + 'winner_criteria' => 'string', + 'winner_delay' => 'int', + 'ip_warmup_enable' => 'bool', + 'initial_quota' => 'int', + 'increase_rate' => 'int' ]; /** @@ -96,31 +96,31 @@ class CreateEmailCampaign implements ModelInterface, ArrayAccess 'tag' => null, 'sender' => null, 'name' => null, - 'htmlContent' => null, - 'htmlUrl' => 'url', - 'templateId' => 'int64', - 'scheduledAt' => null, + 'html_content' => null, + 'html_url' => 'url', + 'template_id' => 'int64', + 'scheduled_at' => 'date-time', 'subject' => null, - 'replyTo' => 'email', - 'toField' => null, + 'reply_to' => 'email', + 'to_field' => null, 'recipients' => null, - 'attachmentUrl' => 'url', - 'inlineImageActivation' => null, - 'mirrorActive' => null, + 'attachment_url' => 'url', + 'inline_image_activation' => null, + 'mirror_active' => null, 'footer' => null, 'header' => null, - 'utmCampaign' => null, + 'utm_campaign' => null, 'params' => null, - 'sendAtBestTime' => null, - 'abTesting' => null, - 'subjectA' => null, - 'subjectB' => null, - 'splitRule' => 'int64', - 'winnerCriteria' => null, - 'winnerDelay' => 'int64', - 'ipWarmupEnable' => null, - 'initialQuota' => 'int64', - 'increaseRate' => 'int64' + 'send_at_best_time' => null, + 'ab_testing' => null, + 'subject_a' => null, + 'subject_b' => null, + 'split_rule' => 'int64', + 'winner_criteria' => null, + 'winner_delay' => 'int64', + 'ip_warmup_enable' => null, + 'initial_quota' => 'int64', + 'increase_rate' => 'int64' ]; /** @@ -153,31 +153,31 @@ public static function swaggerFormats() 'tag' => 'tag', 'sender' => 'sender', 'name' => 'name', - 'htmlContent' => 'htmlContent', - 'htmlUrl' => 'htmlUrl', - 'templateId' => 'templateId', - 'scheduledAt' => 'scheduledAt', + 'html_content' => 'htmlContent', + 'html_url' => 'htmlUrl', + 'template_id' => 'templateId', + 'scheduled_at' => 'scheduledAt', 'subject' => 'subject', - 'replyTo' => 'replyTo', - 'toField' => 'toField', + 'reply_to' => 'replyTo', + 'to_field' => 'toField', 'recipients' => 'recipients', - 'attachmentUrl' => 'attachmentUrl', - 'inlineImageActivation' => 'inlineImageActivation', - 'mirrorActive' => 'mirrorActive', + 'attachment_url' => 'attachmentUrl', + 'inline_image_activation' => 'inlineImageActivation', + 'mirror_active' => 'mirrorActive', 'footer' => 'footer', 'header' => 'header', - 'utmCampaign' => 'utmCampaign', + 'utm_campaign' => 'utmCampaign', 'params' => 'params', - 'sendAtBestTime' => 'sendAtBestTime', - 'abTesting' => 'abTesting', - 'subjectA' => 'subjectA', - 'subjectB' => 'subjectB', - 'splitRule' => 'splitRule', - 'winnerCriteria' => 'winnerCriteria', - 'winnerDelay' => 'winnerDelay', - 'ipWarmupEnable' => 'ipWarmupEnable', - 'initialQuota' => 'initialQuota', - 'increaseRate' => 'increaseRate' + 'send_at_best_time' => 'sendAtBestTime', + 'ab_testing' => 'abTesting', + 'subject_a' => 'subjectA', + 'subject_b' => 'subjectB', + 'split_rule' => 'splitRule', + 'winner_criteria' => 'winnerCriteria', + 'winner_delay' => 'winnerDelay', + 'ip_warmup_enable' => 'ipWarmupEnable', + 'initial_quota' => 'initialQuota', + 'increase_rate' => 'increaseRate' ]; /** @@ -189,31 +189,31 @@ public static function swaggerFormats() 'tag' => 'setTag', 'sender' => 'setSender', 'name' => 'setName', - 'htmlContent' => 'setHtmlContent', - 'htmlUrl' => 'setHtmlUrl', - 'templateId' => 'setTemplateId', - 'scheduledAt' => 'setScheduledAt', + 'html_content' => 'setHtmlContent', + 'html_url' => 'setHtmlUrl', + 'template_id' => 'setTemplateId', + 'scheduled_at' => 'setScheduledAt', 'subject' => 'setSubject', - 'replyTo' => 'setReplyTo', - 'toField' => 'setToField', + 'reply_to' => 'setReplyTo', + 'to_field' => 'setToField', 'recipients' => 'setRecipients', - 'attachmentUrl' => 'setAttachmentUrl', - 'inlineImageActivation' => 'setInlineImageActivation', - 'mirrorActive' => 'setMirrorActive', + 'attachment_url' => 'setAttachmentUrl', + 'inline_image_activation' => 'setInlineImageActivation', + 'mirror_active' => 'setMirrorActive', 'footer' => 'setFooter', 'header' => 'setHeader', - 'utmCampaign' => 'setUtmCampaign', + 'utm_campaign' => 'setUtmCampaign', 'params' => 'setParams', - 'sendAtBestTime' => 'setSendAtBestTime', - 'abTesting' => 'setAbTesting', - 'subjectA' => 'setSubjectA', - 'subjectB' => 'setSubjectB', - 'splitRule' => 'setSplitRule', - 'winnerCriteria' => 'setWinnerCriteria', - 'winnerDelay' => 'setWinnerDelay', - 'ipWarmupEnable' => 'setIpWarmupEnable', - 'initialQuota' => 'setInitialQuota', - 'increaseRate' => 'setIncreaseRate' + 'send_at_best_time' => 'setSendAtBestTime', + 'ab_testing' => 'setAbTesting', + 'subject_a' => 'setSubjectA', + 'subject_b' => 'setSubjectB', + 'split_rule' => 'setSplitRule', + 'winner_criteria' => 'setWinnerCriteria', + 'winner_delay' => 'setWinnerDelay', + 'ip_warmup_enable' => 'setIpWarmupEnable', + 'initial_quota' => 'setInitialQuota', + 'increase_rate' => 'setIncreaseRate' ]; /** @@ -225,31 +225,31 @@ public static function swaggerFormats() 'tag' => 'getTag', 'sender' => 'getSender', 'name' => 'getName', - 'htmlContent' => 'getHtmlContent', - 'htmlUrl' => 'getHtmlUrl', - 'templateId' => 'getTemplateId', - 'scheduledAt' => 'getScheduledAt', + 'html_content' => 'getHtmlContent', + 'html_url' => 'getHtmlUrl', + 'template_id' => 'getTemplateId', + 'scheduled_at' => 'getScheduledAt', 'subject' => 'getSubject', - 'replyTo' => 'getReplyTo', - 'toField' => 'getToField', + 'reply_to' => 'getReplyTo', + 'to_field' => 'getToField', 'recipients' => 'getRecipients', - 'attachmentUrl' => 'getAttachmentUrl', - 'inlineImageActivation' => 'getInlineImageActivation', - 'mirrorActive' => 'getMirrorActive', + 'attachment_url' => 'getAttachmentUrl', + 'inline_image_activation' => 'getInlineImageActivation', + 'mirror_active' => 'getMirrorActive', 'footer' => 'getFooter', 'header' => 'getHeader', - 'utmCampaign' => 'getUtmCampaign', + 'utm_campaign' => 'getUtmCampaign', 'params' => 'getParams', - 'sendAtBestTime' => 'getSendAtBestTime', - 'abTesting' => 'getAbTesting', - 'subjectA' => 'getSubjectA', - 'subjectB' => 'getSubjectB', - 'splitRule' => 'getSplitRule', - 'winnerCriteria' => 'getWinnerCriteria', - 'winnerDelay' => 'getWinnerDelay', - 'ipWarmupEnable' => 'getIpWarmupEnable', - 'initialQuota' => 'getInitialQuota', - 'increaseRate' => 'getIncreaseRate' + 'send_at_best_time' => 'getSendAtBestTime', + 'ab_testing' => 'getAbTesting', + 'subject_a' => 'getSubjectA', + 'subject_b' => 'getSubjectB', + 'split_rule' => 'getSplitRule', + 'winner_criteria' => 'getWinnerCriteria', + 'winner_delay' => 'getWinnerDelay', + 'ip_warmup_enable' => 'getIpWarmupEnable', + 'initial_quota' => 'getInitialQuota', + 'increase_rate' => 'getIncreaseRate' ]; /** @@ -330,31 +330,31 @@ public function __construct(array $data = null) $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; $this->container['sender'] = isset($data['sender']) ? $data['sender'] : null; $this->container['name'] = isset($data['name']) ? $data['name'] : null; - $this->container['htmlContent'] = isset($data['htmlContent']) ? $data['htmlContent'] : null; - $this->container['htmlUrl'] = isset($data['htmlUrl']) ? $data['htmlUrl'] : null; - $this->container['templateId'] = isset($data['templateId']) ? $data['templateId'] : null; - $this->container['scheduledAt'] = isset($data['scheduledAt']) ? $data['scheduledAt'] : null; + $this->container['html_content'] = isset($data['html_content']) ? $data['html_content'] : null; + $this->container['html_url'] = isset($data['html_url']) ? $data['html_url'] : null; + $this->container['template_id'] = isset($data['template_id']) ? $data['template_id'] : null; + $this->container['scheduled_at'] = isset($data['scheduled_at']) ? $data['scheduled_at'] : null; $this->container['subject'] = isset($data['subject']) ? $data['subject'] : null; - $this->container['replyTo'] = isset($data['replyTo']) ? $data['replyTo'] : null; - $this->container['toField'] = isset($data['toField']) ? $data['toField'] : null; + $this->container['reply_to'] = isset($data['reply_to']) ? $data['reply_to'] : null; + $this->container['to_field'] = isset($data['to_field']) ? $data['to_field'] : null; $this->container['recipients'] = isset($data['recipients']) ? $data['recipients'] : null; - $this->container['attachmentUrl'] = isset($data['attachmentUrl']) ? $data['attachmentUrl'] : null; - $this->container['inlineImageActivation'] = isset($data['inlineImageActivation']) ? $data['inlineImageActivation'] : false; - $this->container['mirrorActive'] = isset($data['mirrorActive']) ? $data['mirrorActive'] : null; + $this->container['attachment_url'] = isset($data['attachment_url']) ? $data['attachment_url'] : null; + $this->container['inline_image_activation'] = isset($data['inline_image_activation']) ? $data['inline_image_activation'] : false; + $this->container['mirror_active'] = isset($data['mirror_active']) ? $data['mirror_active'] : null; $this->container['footer'] = isset($data['footer']) ? $data['footer'] : null; $this->container['header'] = isset($data['header']) ? $data['header'] : null; - $this->container['utmCampaign'] = isset($data['utmCampaign']) ? $data['utmCampaign'] : null; + $this->container['utm_campaign'] = isset($data['utm_campaign']) ? $data['utm_campaign'] : null; $this->container['params'] = isset($data['params']) ? $data['params'] : null; - $this->container['sendAtBestTime'] = isset($data['sendAtBestTime']) ? $data['sendAtBestTime'] : false; - $this->container['abTesting'] = isset($data['abTesting']) ? $data['abTesting'] : false; - $this->container['subjectA'] = isset($data['subjectA']) ? $data['subjectA'] : null; - $this->container['subjectB'] = isset($data['subjectB']) ? $data['subjectB'] : null; - $this->container['splitRule'] = isset($data['splitRule']) ? $data['splitRule'] : null; - $this->container['winnerCriteria'] = isset($data['winnerCriteria']) ? $data['winnerCriteria'] : null; - $this->container['winnerDelay'] = isset($data['winnerDelay']) ? $data['winnerDelay'] : null; - $this->container['ipWarmupEnable'] = isset($data['ipWarmupEnable']) ? $data['ipWarmupEnable'] : false; - $this->container['initialQuota'] = isset($data['initialQuota']) ? $data['initialQuota'] : null; - $this->container['increaseRate'] = isset($data['increaseRate']) ? $data['increaseRate'] : null; + $this->container['send_at_best_time'] = isset($data['send_at_best_time']) ? $data['send_at_best_time'] : false; + $this->container['ab_testing'] = isset($data['ab_testing']) ? $data['ab_testing'] : false; + $this->container['subject_a'] = isset($data['subject_a']) ? $data['subject_a'] : null; + $this->container['subject_b'] = isset($data['subject_b']) ? $data['subject_b'] : null; + $this->container['split_rule'] = isset($data['split_rule']) ? $data['split_rule'] : null; + $this->container['winner_criteria'] = isset($data['winner_criteria']) ? $data['winner_criteria'] : null; + $this->container['winner_delay'] = isset($data['winner_delay']) ? $data['winner_delay'] : null; + $this->container['ip_warmup_enable'] = isset($data['ip_warmup_enable']) ? $data['ip_warmup_enable'] : false; + $this->container['initial_quota'] = isset($data['initial_quota']) ? $data['initial_quota'] : null; + $this->container['increase_rate'] = isset($data['increase_rate']) ? $data['increase_rate'] : null; } /** @@ -372,36 +372,36 @@ public function listInvalidProperties() if ($this->container['name'] === null) { $invalidProperties[] = "'name' can't be null"; } - if (!is_null($this->container['splitRule']) && ($this->container['splitRule'] > 50)) { - $invalidProperties[] = "invalid value for 'splitRule', must be smaller than or equal to 50."; + if (!is_null($this->container['split_rule']) && ($this->container['split_rule'] > 50)) { + $invalidProperties[] = "invalid value for 'split_rule', must be smaller than or equal to 50."; } - if (!is_null($this->container['splitRule']) && ($this->container['splitRule'] < 1)) { - $invalidProperties[] = "invalid value for 'splitRule', must be bigger than or equal to 1."; + if (!is_null($this->container['split_rule']) && ($this->container['split_rule'] < 1)) { + $invalidProperties[] = "invalid value for 'split_rule', must be bigger than or equal to 1."; } $allowedValues = $this->getWinnerCriteriaAllowableValues(); - if (!is_null($this->container['winnerCriteria']) && !in_array($this->container['winnerCriteria'], $allowedValues, true)) { + if (!is_null($this->container['winner_criteria']) && !in_array($this->container['winner_criteria'], $allowedValues, true)) { $invalidProperties[] = sprintf( - "invalid value for 'winnerCriteria', must be one of '%s'", + "invalid value for 'winner_criteria', must be one of '%s'", implode("', '", $allowedValues) ); } - if (!is_null($this->container['winnerDelay']) && ($this->container['winnerDelay'] > 168)) { - $invalidProperties[] = "invalid value for 'winnerDelay', must be smaller than or equal to 168."; + if (!is_null($this->container['winner_delay']) && ($this->container['winner_delay'] > 168)) { + $invalidProperties[] = "invalid value for 'winner_delay', must be smaller than or equal to 168."; } - if (!is_null($this->container['winnerDelay']) && ($this->container['winnerDelay'] < 1)) { - $invalidProperties[] = "invalid value for 'winnerDelay', must be bigger than or equal to 1."; + if (!is_null($this->container['winner_delay']) && ($this->container['winner_delay'] < 1)) { + $invalidProperties[] = "invalid value for 'winner_delay', must be bigger than or equal to 1."; } - if (!is_null($this->container['increaseRate']) && ($this->container['increaseRate'] > 100)) { - $invalidProperties[] = "invalid value for 'increaseRate', must be smaller than or equal to 100."; + if (!is_null($this->container['increase_rate']) && ($this->container['increase_rate'] > 100)) { + $invalidProperties[] = "invalid value for 'increase_rate', must be smaller than or equal to 100."; } - if (!is_null($this->container['increaseRate']) && ($this->container['increaseRate'] < 0)) { - $invalidProperties[] = "invalid value for 'increaseRate', must be bigger than or equal to 0."; + if (!is_null($this->container['increase_rate']) && ($this->container['increase_rate'] < 0)) { + $invalidProperties[] = "invalid value for 'increase_rate', must be bigger than or equal to 0."; } return $invalidProperties; @@ -492,97 +492,97 @@ public function setName($name) } /** - * Gets htmlContent + * Gets html_content * * @return string */ public function getHtmlContent() { - return $this->container['htmlContent']; + return $this->container['html_content']; } /** - * Sets htmlContent + * Sets html_content * - * @param string $htmlContent Mandatory if htmlUrl and templateId are empty. Body of the message (HTML) + * @param string $html_content Mandatory if htmlUrl and templateId are empty. Body of the message (HTML) * * @return $this */ - public function setHtmlContent($htmlContent) + public function setHtmlContent($html_content) { - $this->container['htmlContent'] = $htmlContent; + $this->container['html_content'] = $html_content; return $this; } /** - * Gets htmlUrl + * Gets html_url * * @return string */ public function getHtmlUrl() { - return $this->container['htmlUrl']; + return $this->container['html_url']; } /** - * Sets htmlUrl + * Sets html_url * - * @param string $htmlUrl Mandatory if htmlContent and templateId are empty. Url to the message (HTML) + * @param string $html_url Mandatory if htmlContent and templateId are empty. Url to the message (HTML) * * @return $this */ - public function setHtmlUrl($htmlUrl) + public function setHtmlUrl($html_url) { - $this->container['htmlUrl'] = $htmlUrl; + $this->container['html_url'] = $html_url; return $this; } /** - * Gets templateId + * Gets template_id * * @return int */ public function getTemplateId() { - return $this->container['templateId']; + return $this->container['template_id']; } /** - * Sets templateId + * Sets template_id * - * @param int $templateId Mandatory if htmlContent and htmlUrl are empty. Id of the transactional email template with status 'active'. Used to copy only its content fetched from htmlContent/htmlUrl to an email campaign for RSS feature. + * @param int $template_id Mandatory if htmlContent and htmlUrl are empty. Id of the transactional email template with status 'active'. Used to copy only its content fetched from htmlContent/htmlUrl to an email campaign for RSS feature. * * @return $this */ - public function setTemplateId($templateId) + public function setTemplateId($template_id) { - $this->container['templateId'] = $templateId; + $this->container['template_id'] = $template_id; return $this; } /** - * Gets scheduledAt + * Gets scheduled_at * - * @return string + * @return \DateTime */ public function getScheduledAt() { - return $this->container['scheduledAt']; + return $this->container['scheduled_at']; } /** - * Sets scheduledAt + * Sets scheduled_at * - * @param string $scheduledAt Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part). + * @param \DateTime $scheduled_at Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part). * * @return $this */ - public function setScheduledAt($scheduledAt) + public function setScheduledAt($scheduled_at) { - $this->container['scheduledAt'] = $scheduledAt; + $this->container['scheduled_at'] = $scheduled_at; return $this; } @@ -612,49 +612,49 @@ public function setSubject($subject) } /** - * Gets replyTo + * Gets reply_to * * @return string */ public function getReplyTo() { - return $this->container['replyTo']; + return $this->container['reply_to']; } /** - * Sets replyTo + * Sets reply_to * - * @param string $replyTo Email on which the campaign recipients will be able to reply to + * @param string $reply_to Email on which the campaign recipients will be able to reply to * * @return $this */ - public function setReplyTo($replyTo) + public function setReplyTo($reply_to) { - $this->container['replyTo'] = $replyTo; + $this->container['reply_to'] = $reply_to; return $this; } /** - * Gets toField + * Gets to_field * * @return string */ public function getToField() { - return $this->container['toField']; + return $this->container['to_field']; } /** - * Sets toField + * Sets to_field * - * @param string $toField To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization + * @param string $to_field To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization * * @return $this */ - public function setToField($toField) + public function setToField($to_field) { - $this->container['toField'] = $toField; + $this->container['to_field'] = $to_field; return $this; } @@ -684,73 +684,73 @@ public function setRecipients($recipients) } /** - * Gets attachmentUrl + * Gets attachment_url * * @return string */ public function getAttachmentUrl() { - return $this->container['attachmentUrl']; + return $this->container['attachment_url']; } /** - * Sets attachmentUrl + * Sets attachment_url * - * @param string $attachmentUrl Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps + * @param string $attachment_url Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps * * @return $this */ - public function setAttachmentUrl($attachmentUrl) + public function setAttachmentUrl($attachment_url) { - $this->container['attachmentUrl'] = $attachmentUrl; + $this->container['attachment_url'] = $attachment_url; return $this; } /** - * Gets inlineImageActivation + * Gets inline_image_activation * * @return bool */ public function getInlineImageActivation() { - return $this->container['inlineImageActivation']; + return $this->container['inline_image_activation']; } /** - * Sets inlineImageActivation + * Sets inline_image_activation * - * @param bool $inlineImageActivation Use true to embedded the images in your email. Final size of the email should be less than 4MB. Campaigns with embedded images can not be sent to more than 5000 contacts + * @param bool $inline_image_activation Use true to embedded the images in your email. Final size of the email should be less than 4MB. Campaigns with embedded images can not be sent to more than 5000 contacts * * @return $this */ - public function setInlineImageActivation($inlineImageActivation) + public function setInlineImageActivation($inline_image_activation) { - $this->container['inlineImageActivation'] = $inlineImageActivation; + $this->container['inline_image_activation'] = $inline_image_activation; return $this; } /** - * Gets mirrorActive + * Gets mirror_active * * @return bool */ public function getMirrorActive() { - return $this->container['mirrorActive']; + return $this->container['mirror_active']; } /** - * Sets mirrorActive + * Sets mirror_active * - * @param bool $mirrorActive Use true to enable the mirror link + * @param bool $mirror_active Use true to enable the mirror link * * @return $this */ - public function setMirrorActive($mirrorActive) + public function setMirrorActive($mirror_active) { - $this->container['mirrorActive'] = $mirrorActive; + $this->container['mirror_active'] = $mirror_active; return $this; } @@ -804,25 +804,25 @@ public function setHeader($header) } /** - * Gets utmCampaign + * Gets utm_campaign * * @return string */ public function getUtmCampaign() { - return $this->container['utmCampaign']; + return $this->container['utm_campaign']; } /** - * Sets utmCampaign + * Sets utm_campaign * - * @param string $utmCampaign Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed + * @param string $utm_campaign Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed * * @return $this */ - public function setUtmCampaign($utmCampaign) + public function setUtmCampaign($utm_campaign) { - $this->container['utmCampaign'] = $utmCampaign; + $this->container['utm_campaign'] = $utm_campaign; return $this; } @@ -852,274 +852,274 @@ public function setParams($params) } /** - * Gets sendAtBestTime + * Gets send_at_best_time * * @return bool */ public function getSendAtBestTime() { - return $this->container['sendAtBestTime']; + return $this->container['send_at_best_time']; } /** - * Sets sendAtBestTime + * Sets send_at_best_time * - * @param bool $sendAtBestTime Set this to true if you want to send your campaign at best time. + * @param bool $send_at_best_time Set this to true if you want to send your campaign at best time. * * @return $this */ - public function setSendAtBestTime($sendAtBestTime) + public function setSendAtBestTime($send_at_best_time) { - $this->container['sendAtBestTime'] = $sendAtBestTime; + $this->container['send_at_best_time'] = $send_at_best_time; return $this; } /** - * Gets abTesting + * Gets ab_testing * * @return bool */ public function getAbTesting() { - return $this->container['abTesting']; + return $this->container['ab_testing']; } /** - * Sets abTesting + * Sets ab_testing * - * @param bool $abTesting Status of A/B Test. abTesting = false means it is disabled, & abTesting = true means it is enabled. 'subjectA', 'subjectB', 'splitRule', 'winnerCriteria' & 'winnerDelay' will be considered when abTesting is set to true. 'subjectA' & 'subjectB' are mandatory together & 'subject' if passed is ignored. Can be set to true only if 'sendAtBestTime' is 'false'. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B + * @param bool $ab_testing Status of A/B Test. abTesting = false means it is disabled, & abTesting = true means it is enabled. 'subjectA', 'subjectB', 'splitRule', 'winnerCriteria' & 'winnerDelay' will be considered when abTesting is set to true. 'subjectA' & 'subjectB' are mandatory together & 'subject' if passed is ignored. Can be set to true only if 'sendAtBestTime' is 'false'. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B * * @return $this */ - public function setAbTesting($abTesting) + public function setAbTesting($ab_testing) { - $this->container['abTesting'] = $abTesting; + $this->container['ab_testing'] = $ab_testing; return $this; } /** - * Gets subjectA + * Gets subject_a * * @return string */ public function getSubjectA() { - return $this->container['subjectA']; + return $this->container['subject_a']; } /** - * Sets subjectA + * Sets subject_a * - * @param string $subjectA Subject A of the campaign. Mandatory if abTesting = true. subjectA & subjectB should have unique value + * @param string $subject_a Subject A of the campaign. Mandatory if abTesting = true. subjectA & subjectB should have unique value * * @return $this */ - public function setSubjectA($subjectA) + public function setSubjectA($subject_a) { - $this->container['subjectA'] = $subjectA; + $this->container['subject_a'] = $subject_a; return $this; } /** - * Gets subjectB + * Gets subject_b * * @return string */ public function getSubjectB() { - return $this->container['subjectB']; + return $this->container['subject_b']; } /** - * Sets subjectB + * Sets subject_b * - * @param string $subjectB Subject B of the campaign. Mandatory if abTesting = true. subjectA & subjectB should have unique value + * @param string $subject_b Subject B of the campaign. Mandatory if abTesting = true. subjectA & subjectB should have unique value * * @return $this */ - public function setSubjectB($subjectB) + public function setSubjectB($subject_b) { - $this->container['subjectB'] = $subjectB; + $this->container['subject_b'] = $subject_b; return $this; } /** - * Gets splitRule + * Gets split_rule * * @return int */ public function getSplitRule() { - return $this->container['splitRule']; + return $this->container['split_rule']; } /** - * Sets splitRule + * Sets split_rule * - * @param int $splitRule Add the size of your test groups. Mandatory if abTesting = true & 'recipients' is passed. We'll send version A and B to a random sample of recipients, and then the winning version to everyone else + * @param int $split_rule Add the size of your test groups. Mandatory if abTesting = true & 'recipients' is passed. We'll send version A and B to a random sample of recipients, and then the winning version to everyone else * * @return $this */ - public function setSplitRule($splitRule) + public function setSplitRule($split_rule) { - if (!is_null($splitRule) && ($splitRule > 50)) { - throw new \InvalidArgumentException('invalid value for $splitRule when calling CreateEmailCampaign., must be smaller than or equal to 50.'); + if (!is_null($split_rule) && ($split_rule > 50)) { + throw new \InvalidArgumentException('invalid value for $split_rule when calling CreateEmailCampaign., must be smaller than or equal to 50.'); } - if (!is_null($splitRule) && ($splitRule < 1)) { - throw new \InvalidArgumentException('invalid value for $splitRule when calling CreateEmailCampaign., must be bigger than or equal to 1.'); + if (!is_null($split_rule) && ($split_rule < 1)) { + throw new \InvalidArgumentException('invalid value for $split_rule when calling CreateEmailCampaign., must be bigger than or equal to 1.'); } - $this->container['splitRule'] = $splitRule; + $this->container['split_rule'] = $split_rule; return $this; } /** - * Gets winnerCriteria + * Gets winner_criteria * * @return string */ public function getWinnerCriteria() { - return $this->container['winnerCriteria']; + return $this->container['winner_criteria']; } /** - * Sets winnerCriteria + * Sets winner_criteria * - * @param string $winnerCriteria Choose the metrics that will determinate the winning version. Mandatory if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerCriteria' is ignored if passed + * @param string $winner_criteria Choose the metrics that will determinate the winning version. Mandatory if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerCriteria' is ignored if passed * * @return $this */ - public function setWinnerCriteria($winnerCriteria) + public function setWinnerCriteria($winner_criteria) { $allowedValues = $this->getWinnerCriteriaAllowableValues(); - if (!is_null($winnerCriteria) && !in_array($winnerCriteria, $allowedValues, true)) { + if (!is_null($winner_criteria) && !in_array($winner_criteria, $allowedValues, true)) { throw new \InvalidArgumentException( sprintf( - "Invalid value for 'winnerCriteria', must be one of '%s'", + "Invalid value for 'winner_criteria', must be one of '%s'", implode("', '", $allowedValues) ) ); } - $this->container['winnerCriteria'] = $winnerCriteria; + $this->container['winner_criteria'] = $winner_criteria; return $this; } /** - * Gets winnerDelay + * Gets winner_delay * * @return int */ public function getWinnerDelay() { - return $this->container['winnerDelay']; + return $this->container['winner_delay']; } /** - * Sets winnerDelay + * Sets winner_delay * - * @param int $winnerDelay Choose the duration of the test in hours. Maximum is 7 days, pass 24*7 = 168 hours. The winning version will be sent at the end of the test. Mandatory if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerDelay' is ignored if passed + * @param int $winner_delay Choose the duration of the test in hours. Maximum is 7 days, pass 24*7 = 168 hours. The winning version will be sent at the end of the test. Mandatory if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerDelay' is ignored if passed * * @return $this */ - public function setWinnerDelay($winnerDelay) + public function setWinnerDelay($winner_delay) { - if (!is_null($winnerDelay) && ($winnerDelay > 168)) { - throw new \InvalidArgumentException('invalid value for $winnerDelay when calling CreateEmailCampaign., must be smaller than or equal to 168.'); + if (!is_null($winner_delay) && ($winner_delay > 168)) { + throw new \InvalidArgumentException('invalid value for $winner_delay when calling CreateEmailCampaign., must be smaller than or equal to 168.'); } - if (!is_null($winnerDelay) && ($winnerDelay < 1)) { - throw new \InvalidArgumentException('invalid value for $winnerDelay when calling CreateEmailCampaign., must be bigger than or equal to 1.'); + if (!is_null($winner_delay) && ($winner_delay < 1)) { + throw new \InvalidArgumentException('invalid value for $winner_delay when calling CreateEmailCampaign., must be bigger than or equal to 1.'); } - $this->container['winnerDelay'] = $winnerDelay; + $this->container['winner_delay'] = $winner_delay; return $this; } /** - * Gets ipWarmupEnable + * Gets ip_warmup_enable * * @return bool */ public function getIpWarmupEnable() { - return $this->container['ipWarmupEnable']; + return $this->container['ip_warmup_enable']; } /** - * Sets ipWarmupEnable + * Sets ip_warmup_enable * - * @param bool $ipWarmupEnable Available for dedicated ip clients. Set this to true if you wish to warm up your ip. + * @param bool $ip_warmup_enable Available for dedicated ip clients. Set this to true if you wish to warm up your ip. * * @return $this */ - public function setIpWarmupEnable($ipWarmupEnable) + public function setIpWarmupEnable($ip_warmup_enable) { - $this->container['ipWarmupEnable'] = $ipWarmupEnable; + $this->container['ip_warmup_enable'] = $ip_warmup_enable; return $this; } /** - * Gets initialQuota + * Gets initial_quota * * @return int */ public function getInitialQuota() { - return $this->container['initialQuota']; + return $this->container['initial_quota']; } /** - * Sets initialQuota + * Sets initial_quota * - * @param int $initialQuota Mandatory if ipWarmupEnable is set to true. Set an initial quota greater than 1 for warming up your ip. We recommend you set a value of 3000. + * @param int $initial_quota Mandatory if ipWarmupEnable is set to true. Set an initial quota greater than 1 for warming up your ip. We recommend you set a value of 3000. * * @return $this */ - public function setInitialQuota($initialQuota) + public function setInitialQuota($initial_quota) { - $this->container['initialQuota'] = $initialQuota; + $this->container['initial_quota'] = $initial_quota; return $this; } /** - * Gets increaseRate + * Gets increase_rate * * @return int */ public function getIncreaseRate() { - return $this->container['increaseRate']; + return $this->container['increase_rate']; } /** - * Sets increaseRate + * Sets increase_rate * - * @param int $increaseRate Mandatory if ipWarmupEnable is set to true. Set a percentage increase rate for warming up your ip. We recommend you set the increase rate to 30% per day. If you want to send the same number of emails every day, set the daily increase value to 0%. + * @param int $increase_rate Mandatory if ipWarmupEnable is set to true. Set a percentage increase rate for warming up your ip. We recommend you set the increase rate to 30% per day. If you want to send the same number of emails every day, set the daily increase value to 0%. * * @return $this */ - public function setIncreaseRate($increaseRate) + public function setIncreaseRate($increase_rate) { - if (!is_null($increaseRate) && ($increaseRate > 100)) { - throw new \InvalidArgumentException('invalid value for $increaseRate when calling CreateEmailCampaign., must be smaller than or equal to 100.'); + if (!is_null($increase_rate) && ($increase_rate > 100)) { + throw new \InvalidArgumentException('invalid value for $increase_rate when calling CreateEmailCampaign., must be smaller than or equal to 100.'); } - if (!is_null($increaseRate) && ($increaseRate < 0)) { - throw new \InvalidArgumentException('invalid value for $increaseRate when calling CreateEmailCampaign., must be bigger than or equal to 0.'); + if (!is_null($increase_rate) && ($increase_rate < 0)) { + throw new \InvalidArgumentException('invalid value for $increase_rate when calling CreateEmailCampaign., must be bigger than or equal to 0.'); } - $this->container['increaseRate'] = $increaseRate; + $this->container['increase_rate'] = $increase_rate; return $this; } @@ -1130,6 +1130,7 @@ public function setIncreaseRate($increaseRate) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -1142,6 +1143,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -1155,6 +1157,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -1171,6 +1174,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/CreateEmailCampaignRecipients.php b/lib/Model/CreateEmailCampaignRecipients.php index 7dc60230..58824999 100644 --- a/lib/Model/CreateEmailCampaignRecipients.php +++ b/lib/Model/CreateEmailCampaignRecipients.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -58,8 +58,8 @@ class CreateEmailCampaignRecipients implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'exclusionListIds' => 'int[]', - 'listIds' => 'int[]' + 'exclusion_list_ids' => 'int[]', + 'list_ids' => 'int[]' ]; /** @@ -68,8 +68,8 @@ class CreateEmailCampaignRecipients implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'exclusionListIds' => 'int64', - 'listIds' => 'int64' + 'exclusion_list_ids' => 'int64', + 'list_ids' => 'int64' ]; /** @@ -99,8 +99,8 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'exclusionListIds' => 'exclusionListIds', - 'listIds' => 'listIds' + 'exclusion_list_ids' => 'exclusionListIds', + 'list_ids' => 'listIds' ]; /** @@ -109,8 +109,8 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'exclusionListIds' => 'setExclusionListIds', - 'listIds' => 'setListIds' + 'exclusion_list_ids' => 'setExclusionListIds', + 'list_ids' => 'setListIds' ]; /** @@ -119,8 +119,8 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'exclusionListIds' => 'getExclusionListIds', - 'listIds' => 'getListIds' + 'exclusion_list_ids' => 'getExclusionListIds', + 'list_ids' => 'getListIds' ]; /** @@ -183,8 +183,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['exclusionListIds'] = isset($data['exclusionListIds']) ? $data['exclusionListIds'] : null; - $this->container['listIds'] = isset($data['listIds']) ? $data['listIds'] : null; + $this->container['exclusion_list_ids'] = isset($data['exclusion_list_ids']) ? $data['exclusion_list_ids'] : null; + $this->container['list_ids'] = isset($data['list_ids']) ? $data['list_ids'] : null; } /** @@ -212,49 +212,49 @@ public function valid() /** - * Gets exclusionListIds + * Gets exclusion_list_ids * * @return int[] */ public function getExclusionListIds() { - return $this->container['exclusionListIds']; + return $this->container['exclusion_list_ids']; } /** - * Sets exclusionListIds + * Sets exclusion_list_ids * - * @param int[] $exclusionListIds List ids to exclude from the campaign + * @param int[] $exclusion_list_ids List ids to exclude from the campaign * * @return $this */ - public function setExclusionListIds($exclusionListIds) + public function setExclusionListIds($exclusion_list_ids) { - $this->container['exclusionListIds'] = $exclusionListIds; + $this->container['exclusion_list_ids'] = $exclusion_list_ids; return $this; } /** - * Gets listIds + * Gets list_ids * * @return int[] */ public function getListIds() { - return $this->container['listIds']; + return $this->container['list_ids']; } /** - * Sets listIds + * Sets list_ids * - * @param int[] $listIds Mandatory if scheduledAt is not empty. List Ids to send the campaign to + * @param int[] $list_ids Mandatory if scheduledAt is not empty. List Ids to send the campaign to * * @return $this */ - public function setListIds($listIds) + public function setListIds($list_ids) { - $this->container['listIds'] = $listIds; + $this->container['list_ids'] = $list_ids; return $this; } @@ -265,6 +265,7 @@ public function setListIds($listIds) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -277,6 +278,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -290,6 +292,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -306,6 +309,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/CreateEmailCampaignSender.php b/lib/Model/CreateEmailCampaignSender.php index 6cd43770..01f2a6f7 100644 --- a/lib/Model/CreateEmailCampaignSender.php +++ b/lib/Model/CreateEmailCampaignSender.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -36,7 +36,7 @@ * CreateEmailCampaignSender Class Doc Comment * * @category Class - * @description Sender details including id or email and name (optional). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example `{\"name\":\"xyz\", \"email\":\"example@abc.com\"}` , `{\"name\":\"xyz\", \"id\":123}` + * @description Sender details including id or email and name (optional). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example `{\"name\":\"xyz\", \"email\":\"example@abc.com\"}` , `{\"name\":\"xyz\", \"id\":123}` * @package SendinBlue\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen @@ -202,9 +202,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['email'] === null) { - $invalidProperties[] = "'email' can't be null"; - } return $invalidProperties; } @@ -298,6 +295,7 @@ public function setId($id) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -310,6 +308,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -323,6 +322,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -339,6 +339,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/CreateList.php b/lib/Model/CreateList.php index fbfa7f9f..b5423a78 100644 --- a/lib/Model/CreateList.php +++ b/lib/Model/CreateList.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -58,7 +58,7 @@ class CreateList implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'name' => 'string', - 'folderId' => 'int' + 'folder_id' => 'int' ]; /** @@ -68,7 +68,7 @@ class CreateList implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'name' => null, - 'folderId' => 'int64' + 'folder_id' => 'int64' ]; /** @@ -99,7 +99,7 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'name' => 'name', - 'folderId' => 'folderId' + 'folder_id' => 'folderId' ]; /** @@ -109,7 +109,7 @@ public static function swaggerFormats() */ protected static $setters = [ 'name' => 'setName', - 'folderId' => 'setFolderId' + 'folder_id' => 'setFolderId' ]; /** @@ -119,7 +119,7 @@ public static function swaggerFormats() */ protected static $getters = [ 'name' => 'getName', - 'folderId' => 'getFolderId' + 'folder_id' => 'getFolderId' ]; /** @@ -183,7 +183,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['name'] = isset($data['name']) ? $data['name'] : null; - $this->container['folderId'] = isset($data['folderId']) ? $data['folderId'] : null; + $this->container['folder_id'] = isset($data['folder_id']) ? $data['folder_id'] : null; } /** @@ -198,8 +198,8 @@ public function listInvalidProperties() if ($this->container['name'] === null) { $invalidProperties[] = "'name' can't be null"; } - if ($this->container['folderId'] === null) { - $invalidProperties[] = "'folderId' can't be null"; + if ($this->container['folder_id'] === null) { + $invalidProperties[] = "'folder_id' can't be null"; } return $invalidProperties; } @@ -241,25 +241,25 @@ public function setName($name) } /** - * Gets folderId + * Gets folder_id * * @return int */ public function getFolderId() { - return $this->container['folderId']; + return $this->container['folder_id']; } /** - * Sets folderId + * Sets folder_id * - * @param int $folderId Id of the parent folder in which this list is to be created + * @param int $folder_id Id of the parent folder in which this list is to be created * * @return $this */ - public function setFolderId($folderId) + public function setFolderId($folder_id) { - $this->container['folderId'] = $folderId; + $this->container['folder_id'] = $folder_id; return $this; } @@ -270,6 +270,7 @@ public function setFolderId($folderId) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -282,6 +283,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -295,6 +297,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -311,6 +314,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/CreateModel.php b/lib/Model/CreateModel.php index 7286aa94..f8e3e44b 100644 --- a/lib/Model/CreateModel.php +++ b/lib/Model/CreateModel.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -237,6 +237,7 @@ public function setId($id) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -249,6 +250,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -262,6 +264,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -278,6 +281,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/CreateReseller.php b/lib/Model/CreateReseller.php index a3aa445e..fadc4791 100644 --- a/lib/Model/CreateReseller.php +++ b/lib/Model/CreateReseller.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -57,7 +57,7 @@ class CreateReseller implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'authKey' => 'string', + 'auth_key' => 'string', 'id' => 'int' ]; @@ -67,7 +67,7 @@ class CreateReseller implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'authKey' => null, + 'auth_key' => null, 'id' => 'int64' ]; @@ -98,7 +98,7 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'authKey' => 'authKey', + 'auth_key' => 'authKey', 'id' => 'id' ]; @@ -108,7 +108,7 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'authKey' => 'setAuthKey', + 'auth_key' => 'setAuthKey', 'id' => 'setId' ]; @@ -118,7 +118,7 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'authKey' => 'getAuthKey', + 'auth_key' => 'getAuthKey', 'id' => 'getId' ]; @@ -182,7 +182,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['authKey'] = isset($data['authKey']) ? $data['authKey'] : null; + $this->container['auth_key'] = isset($data['auth_key']) ? $data['auth_key'] : null; $this->container['id'] = isset($data['id']) ? $data['id'] : null; } @@ -195,8 +195,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['authKey'] === null) { - $invalidProperties[] = "'authKey' can't be null"; + if ($this->container['auth_key'] === null) { + $invalidProperties[] = "'auth_key' can't be null"; } return $invalidProperties; } @@ -214,25 +214,25 @@ public function valid() /** - * Gets authKey + * Gets auth_key * * @return string */ public function getAuthKey() { - return $this->container['authKey']; + return $this->container['auth_key']; } /** - * Sets authKey + * Sets auth_key * - * @param string $authKey AuthKey of Reseller child created + * @param string $auth_key AuthKey of Reseller child created * * @return $this */ - public function setAuthKey($authKey) + public function setAuthKey($auth_key) { - $this->container['authKey'] = $authKey; + $this->container['auth_key'] = $auth_key; return $this; } @@ -267,6 +267,7 @@ public function setId($id) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -279,6 +280,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -292,6 +294,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -308,6 +311,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/CreateSender.php b/lib/Model/CreateSender.php index eec0a7b7..ae5f4992 100644 --- a/lib/Model/CreateSender.php +++ b/lib/Model/CreateSender.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -300,6 +300,7 @@ public function setIps($ips) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -312,6 +313,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -325,6 +327,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -341,6 +344,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/CreateSenderIps.php b/lib/Model/CreateSenderIps.php index 5d6ec793..0f0558e5 100644 --- a/lib/Model/CreateSenderIps.php +++ b/lib/Model/CreateSenderIps.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -316,6 +316,7 @@ public function setWeight($weight) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -328,6 +329,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -341,6 +343,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -357,6 +360,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/CreateSenderModel.php b/lib/Model/CreateSenderModel.php index ee20896a..c89f9b89 100644 --- a/lib/Model/CreateSenderModel.php +++ b/lib/Model/CreateSenderModel.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -58,8 +58,8 @@ class CreateSenderModel implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'id' => 'int', - 'spfError' => 'bool', - 'dkimError' => 'bool' + 'spf_error' => 'bool', + 'dkim_error' => 'bool' ]; /** @@ -69,8 +69,8 @@ class CreateSenderModel implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'id' => 'int64', - 'spfError' => null, - 'dkimError' => null + 'spf_error' => null, + 'dkim_error' => null ]; /** @@ -101,8 +101,8 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'id' => 'id', - 'spfError' => 'spfError', - 'dkimError' => 'dkimError' + 'spf_error' => 'spfError', + 'dkim_error' => 'dkimError' ]; /** @@ -112,8 +112,8 @@ public static function swaggerFormats() */ protected static $setters = [ 'id' => 'setId', - 'spfError' => 'setSpfError', - 'dkimError' => 'setDkimError' + 'spf_error' => 'setSpfError', + 'dkim_error' => 'setDkimError' ]; /** @@ -123,8 +123,8 @@ public static function swaggerFormats() */ protected static $getters = [ 'id' => 'getId', - 'spfError' => 'getSpfError', - 'dkimError' => 'getDkimError' + 'spf_error' => 'getSpfError', + 'dkim_error' => 'getDkimError' ]; /** @@ -188,8 +188,8 @@ public function getModelName() public function __construct(array $data = null) { $this->container['id'] = isset($data['id']) ? $data['id'] : null; - $this->container['spfError'] = isset($data['spfError']) ? $data['spfError'] : null; - $this->container['dkimError'] = isset($data['dkimError']) ? $data['dkimError'] : null; + $this->container['spf_error'] = isset($data['spf_error']) ? $data['spf_error'] : null; + $this->container['dkim_error'] = isset($data['dkim_error']) ? $data['dkim_error'] : null; } /** @@ -244,49 +244,49 @@ public function setId($id) } /** - * Gets spfError + * Gets spf_error * * @return bool */ public function getSpfError() { - return $this->container['spfError']; + return $this->container['spf_error']; } /** - * Sets spfError + * Sets spf_error * - * @param bool $spfError Status of SPF configuration for the sender (true = SPF not well configured, false = SPF well configured) + * @param bool $spf_error Status of SPF configuration for the sender (true = SPF not well configured, false = SPF well configured) * * @return $this */ - public function setSpfError($spfError) + public function setSpfError($spf_error) { - $this->container['spfError'] = $spfError; + $this->container['spf_error'] = $spf_error; return $this; } /** - * Gets dkimError + * Gets dkim_error * * @return bool */ public function getDkimError() { - return $this->container['dkimError']; + return $this->container['dkim_error']; } /** - * Sets dkimError + * Sets dkim_error * - * @param bool $dkimError Status of DKIM configuration for the sender (true = DKIM not well configured, false = DKIM well configured) + * @param bool $dkim_error Status of DKIM configuration for the sender (true = DKIM not well configured, false = DKIM well configured) * * @return $this */ - public function setDkimError($dkimError) + public function setDkimError($dkim_error) { - $this->container['dkimError'] = $dkimError; + $this->container['dkim_error'] = $dkim_error; return $this; } @@ -297,6 +297,7 @@ public function setDkimError($dkimError) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -309,6 +310,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -322,6 +324,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -338,6 +341,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/CreateSmsCampaign.php b/lib/Model/CreateSmsCampaign.php index deab9d41..540ef2e9 100644 --- a/lib/Model/CreateSmsCampaign.php +++ b/lib/Model/CreateSmsCampaign.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -61,8 +61,7 @@ class CreateSmsCampaign implements ModelInterface, ArrayAccess 'sender' => 'string', 'content' => 'string', 'recipients' => '\SendinBlue\Client\Model\CreateSmsCampaignRecipients', - 'scheduledAt' => 'string', - 'unicodeEnabled' => 'bool' + 'scheduled_at' => '\DateTime' ]; /** @@ -75,8 +74,7 @@ class CreateSmsCampaign implements ModelInterface, ArrayAccess 'sender' => null, 'content' => null, 'recipients' => null, - 'scheduledAt' => null, - 'unicodeEnabled' => null + 'scheduled_at' => 'date-time' ]; /** @@ -110,8 +108,7 @@ public static function swaggerFormats() 'sender' => 'sender', 'content' => 'content', 'recipients' => 'recipients', - 'scheduledAt' => 'scheduledAt', - 'unicodeEnabled' => 'unicodeEnabled' + 'scheduled_at' => 'scheduledAt' ]; /** @@ -124,8 +121,7 @@ public static function swaggerFormats() 'sender' => 'setSender', 'content' => 'setContent', 'recipients' => 'setRecipients', - 'scheduledAt' => 'setScheduledAt', - 'unicodeEnabled' => 'setUnicodeEnabled' + 'scheduled_at' => 'setScheduledAt' ]; /** @@ -138,8 +134,7 @@ public static function swaggerFormats() 'sender' => 'getSender', 'content' => 'getContent', 'recipients' => 'getRecipients', - 'scheduledAt' => 'getScheduledAt', - 'unicodeEnabled' => 'getUnicodeEnabled' + 'scheduled_at' => 'getScheduledAt' ]; /** @@ -206,8 +201,7 @@ public function __construct(array $data = null) $this->container['sender'] = isset($data['sender']) ? $data['sender'] : null; $this->container['content'] = isset($data['content']) ? $data['content'] : null; $this->container['recipients'] = isset($data['recipients']) ? $data['recipients'] : null; - $this->container['scheduledAt'] = isset($data['scheduledAt']) ? $data['scheduledAt'] : null; - $this->container['unicodeEnabled'] = isset($data['unicodeEnabled']) ? $data['unicodeEnabled'] : false; + $this->container['scheduled_at'] = isset($data['scheduled_at']) ? $data['scheduled_at'] : null; } /** @@ -348,49 +342,25 @@ public function setRecipients($recipients) } /** - * Gets scheduledAt + * Gets scheduled_at * - * @return string + * @return \DateTime */ public function getScheduledAt() { - return $this->container['scheduledAt']; - } - - /** - * Sets scheduledAt - * - * @param string $scheduledAt UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. - * - * @return $this - */ - public function setScheduledAt($scheduledAt) - { - $this->container['scheduledAt'] = $scheduledAt; - - return $this; - } - - /** - * Gets unicodeEnabled - * - * @return bool - */ - public function getUnicodeEnabled() - { - return $this->container['unicodeEnabled']; + return $this->container['scheduled_at']; } /** - * Sets unicodeEnabled + * Sets scheduled_at * - * @param bool $unicodeEnabled Format of the message. It indicates whether the content should be treated as unicode or not. + * @param \DateTime $scheduled_at UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. * * @return $this */ - public function setUnicodeEnabled($unicodeEnabled) + public function setScheduledAt($scheduled_at) { - $this->container['unicodeEnabled'] = $unicodeEnabled; + $this->container['scheduled_at'] = $scheduled_at; return $this; } @@ -401,6 +371,7 @@ public function setUnicodeEnabled($unicodeEnabled) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -413,6 +384,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -426,6 +398,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -442,6 +415,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/CreateSmsCampaignRecipients.php b/lib/Model/CreateSmsCampaignRecipients.php index 2f2e8482..1b6d8991 100644 --- a/lib/Model/CreateSmsCampaignRecipients.php +++ b/lib/Model/CreateSmsCampaignRecipients.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -57,8 +57,8 @@ class CreateSmsCampaignRecipients implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'listIds' => 'int[]', - 'exclusionListIds' => 'int[]' + 'list_ids' => 'int[]', + 'exclusion_list_ids' => 'int[]' ]; /** @@ -67,8 +67,8 @@ class CreateSmsCampaignRecipients implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'listIds' => 'int64', - 'exclusionListIds' => 'int64' + 'list_ids' => 'int64', + 'exclusion_list_ids' => 'int64' ]; /** @@ -98,8 +98,8 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'listIds' => 'listIds', - 'exclusionListIds' => 'exclusionListIds' + 'list_ids' => 'listIds', + 'exclusion_list_ids' => 'exclusionListIds' ]; /** @@ -108,8 +108,8 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'listIds' => 'setListIds', - 'exclusionListIds' => 'setExclusionListIds' + 'list_ids' => 'setListIds', + 'exclusion_list_ids' => 'setExclusionListIds' ]; /** @@ -118,8 +118,8 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'listIds' => 'getListIds', - 'exclusionListIds' => 'getExclusionListIds' + 'list_ids' => 'getListIds', + 'exclusion_list_ids' => 'getExclusionListIds' ]; /** @@ -182,8 +182,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['listIds'] = isset($data['listIds']) ? $data['listIds'] : null; - $this->container['exclusionListIds'] = isset($data['exclusionListIds']) ? $data['exclusionListIds'] : null; + $this->container['list_ids'] = isset($data['list_ids']) ? $data['list_ids'] : null; + $this->container['exclusion_list_ids'] = isset($data['exclusion_list_ids']) ? $data['exclusion_list_ids'] : null; } /** @@ -195,8 +195,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['listIds'] === null) { - $invalidProperties[] = "'listIds' can't be null"; + if ($this->container['list_ids'] === null) { + $invalidProperties[] = "'list_ids' can't be null"; } return $invalidProperties; } @@ -214,49 +214,49 @@ public function valid() /** - * Gets listIds + * Gets list_ids * * @return int[] */ public function getListIds() { - return $this->container['listIds']; + return $this->container['list_ids']; } /** - * Sets listIds + * Sets list_ids * - * @param int[] $listIds Lists Ids to send the campaign to. REQUIRED if scheduledAt is not empty + * @param int[] $list_ids Lists Ids to send the campaign to. REQUIRED if scheduledAt is not empty * * @return $this */ - public function setListIds($listIds) + public function setListIds($list_ids) { - $this->container['listIds'] = $listIds; + $this->container['list_ids'] = $list_ids; return $this; } /** - * Gets exclusionListIds + * Gets exclusion_list_ids * * @return int[] */ public function getExclusionListIds() { - return $this->container['exclusionListIds']; + return $this->container['exclusion_list_ids']; } /** - * Sets exclusionListIds + * Sets exclusion_list_ids * - * @param int[] $exclusionListIds List ids which have to be excluded from a campaign + * @param int[] $exclusion_list_ids List ids which have to be excluded from a campaign * * @return $this */ - public function setExclusionListIds($exclusionListIds) + public function setExclusionListIds($exclusion_list_ids) { - $this->container['exclusionListIds'] = $exclusionListIds; + $this->container['exclusion_list_ids'] = $exclusion_list_ids; return $this; } @@ -267,6 +267,7 @@ public function setExclusionListIds($exclusionListIds) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -279,6 +280,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -292,6 +294,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -308,6 +311,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/CreateSmtpEmail.php b/lib/Model/CreateSmtpEmail.php index 078577ae..5dec0fa8 100644 --- a/lib/Model/CreateSmtpEmail.php +++ b/lib/Model/CreateSmtpEmail.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -57,8 +57,7 @@ class CreateSmtpEmail implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'messageId' => 'string', - 'messageIds' => 'string[]' + 'message_id' => 'string' ]; /** @@ -67,8 +66,7 @@ class CreateSmtpEmail implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'messageId' => null, - 'messageIds' => null + 'message_id' => null ]; /** @@ -98,8 +96,7 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'messageId' => 'messageId', - 'messageIds' => 'messageIds' + 'message_id' => 'messageId' ]; /** @@ -108,8 +105,7 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'messageId' => 'setMessageId', - 'messageIds' => 'setMessageIds' + 'message_id' => 'setMessageId' ]; /** @@ -118,8 +114,7 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'messageId' => 'getMessageId', - 'messageIds' => 'getMessageIds' + 'message_id' => 'getMessageId' ]; /** @@ -182,8 +177,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['messageId'] = isset($data['messageId']) ? $data['messageId'] : null; - $this->container['messageIds'] = isset($data['messageIds']) ? $data['messageIds'] : null; + $this->container['message_id'] = isset($data['message_id']) ? $data['message_id'] : null; } /** @@ -195,6 +189,9 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['message_id'] === null) { + $invalidProperties[] = "'message_id' can't be null"; + } return $invalidProperties; } @@ -211,49 +208,25 @@ public function valid() /** - * Gets messageId + * Gets message_id * * @return string */ public function getMessageId() { - return $this->container['messageId']; - } - - /** - * Sets messageId - * - * @param string $messageId Message ID of the transactional email sent - * - * @return $this - */ - public function setMessageId($messageId) - { - $this->container['messageId'] = $messageId; - - return $this; - } - - /** - * Gets messageIds - * - * @return string[] - */ - public function getMessageIds() - { - return $this->container['messageIds']; + return $this->container['message_id']; } /** - * Sets messageIds + * Sets message_id * - * @param string[] $messageIds messageIds + * @param string $message_id Message ID of the transactional email sent * * @return $this */ - public function setMessageIds($messageIds) + public function setMessageId($message_id) { - $this->container['messageIds'] = $messageIds; + $this->container['message_id'] = $message_id; return $this; } @@ -264,6 +237,7 @@ public function setMessageIds($messageIds) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -276,6 +250,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -289,6 +264,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -305,6 +281,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/CreateSmtpTemplate.php b/lib/Model/CreateSmtpTemplate.php index e146ebf4..359aed2a 100644 --- a/lib/Model/CreateSmtpTemplate.php +++ b/lib/Model/CreateSmtpTemplate.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -59,14 +59,14 @@ class CreateSmtpTemplate implements ModelInterface, ArrayAccess protected static $swaggerTypes = [ 'tag' => 'string', 'sender' => '\SendinBlue\Client\Model\CreateSmtpTemplateSender', - 'templateName' => 'string', - 'htmlContent' => 'string', - 'htmlUrl' => 'string', + 'template_name' => 'string', + 'html_content' => 'string', + 'html_url' => 'string', 'subject' => 'string', - 'replyTo' => 'string', - 'toField' => 'string', - 'attachmentUrl' => 'string', - 'isActive' => 'bool' + 'reply_to' => 'string', + 'to_field' => 'string', + 'attachment_url' => 'string', + 'is_active' => 'bool' ]; /** @@ -77,14 +77,14 @@ class CreateSmtpTemplate implements ModelInterface, ArrayAccess protected static $swaggerFormats = [ 'tag' => null, 'sender' => null, - 'templateName' => null, - 'htmlContent' => null, - 'htmlUrl' => 'url', + 'template_name' => null, + 'html_content' => null, + 'html_url' => 'url', 'subject' => null, - 'replyTo' => 'email', - 'toField' => null, - 'attachmentUrl' => 'url', - 'isActive' => null + 'reply_to' => 'email', + 'to_field' => null, + 'attachment_url' => 'url', + 'is_active' => null ]; /** @@ -116,14 +116,14 @@ public static function swaggerFormats() protected static $attributeMap = [ 'tag' => 'tag', 'sender' => 'sender', - 'templateName' => 'templateName', - 'htmlContent' => 'htmlContent', - 'htmlUrl' => 'htmlUrl', + 'template_name' => 'templateName', + 'html_content' => 'htmlContent', + 'html_url' => 'htmlUrl', 'subject' => 'subject', - 'replyTo' => 'replyTo', - 'toField' => 'toField', - 'attachmentUrl' => 'attachmentUrl', - 'isActive' => 'isActive' + 'reply_to' => 'replyTo', + 'to_field' => 'toField', + 'attachment_url' => 'attachmentUrl', + 'is_active' => 'isActive' ]; /** @@ -134,14 +134,14 @@ public static function swaggerFormats() protected static $setters = [ 'tag' => 'setTag', 'sender' => 'setSender', - 'templateName' => 'setTemplateName', - 'htmlContent' => 'setHtmlContent', - 'htmlUrl' => 'setHtmlUrl', + 'template_name' => 'setTemplateName', + 'html_content' => 'setHtmlContent', + 'html_url' => 'setHtmlUrl', 'subject' => 'setSubject', - 'replyTo' => 'setReplyTo', - 'toField' => 'setToField', - 'attachmentUrl' => 'setAttachmentUrl', - 'isActive' => 'setIsActive' + 'reply_to' => 'setReplyTo', + 'to_field' => 'setToField', + 'attachment_url' => 'setAttachmentUrl', + 'is_active' => 'setIsActive' ]; /** @@ -152,14 +152,14 @@ public static function swaggerFormats() protected static $getters = [ 'tag' => 'getTag', 'sender' => 'getSender', - 'templateName' => 'getTemplateName', - 'htmlContent' => 'getHtmlContent', - 'htmlUrl' => 'getHtmlUrl', + 'template_name' => 'getTemplateName', + 'html_content' => 'getHtmlContent', + 'html_url' => 'getHtmlUrl', 'subject' => 'getSubject', - 'replyTo' => 'getReplyTo', - 'toField' => 'getToField', - 'attachmentUrl' => 'getAttachmentUrl', - 'isActive' => 'getIsActive' + 'reply_to' => 'getReplyTo', + 'to_field' => 'getToField', + 'attachment_url' => 'getAttachmentUrl', + 'is_active' => 'getIsActive' ]; /** @@ -224,14 +224,14 @@ public function __construct(array $data = null) { $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; $this->container['sender'] = isset($data['sender']) ? $data['sender'] : null; - $this->container['templateName'] = isset($data['templateName']) ? $data['templateName'] : null; - $this->container['htmlContent'] = isset($data['htmlContent']) ? $data['htmlContent'] : null; - $this->container['htmlUrl'] = isset($data['htmlUrl']) ? $data['htmlUrl'] : null; + $this->container['template_name'] = isset($data['template_name']) ? $data['template_name'] : null; + $this->container['html_content'] = isset($data['html_content']) ? $data['html_content'] : null; + $this->container['html_url'] = isset($data['html_url']) ? $data['html_url'] : null; $this->container['subject'] = isset($data['subject']) ? $data['subject'] : null; - $this->container['replyTo'] = isset($data['replyTo']) ? $data['replyTo'] : null; - $this->container['toField'] = isset($data['toField']) ? $data['toField'] : null; - $this->container['attachmentUrl'] = isset($data['attachmentUrl']) ? $data['attachmentUrl'] : null; - $this->container['isActive'] = isset($data['isActive']) ? $data['isActive'] : null; + $this->container['reply_to'] = isset($data['reply_to']) ? $data['reply_to'] : null; + $this->container['to_field'] = isset($data['to_field']) ? $data['to_field'] : null; + $this->container['attachment_url'] = isset($data['attachment_url']) ? $data['attachment_url'] : null; + $this->container['is_active'] = isset($data['is_active']) ? $data['is_active'] : null; } /** @@ -246,8 +246,8 @@ public function listInvalidProperties() if ($this->container['sender'] === null) { $invalidProperties[] = "'sender' can't be null"; } - if ($this->container['templateName'] === null) { - $invalidProperties[] = "'templateName' can't be null"; + if ($this->container['template_name'] === null) { + $invalidProperties[] = "'template_name' can't be null"; } if ($this->container['subject'] === null) { $invalidProperties[] = "'subject' can't be null"; @@ -316,73 +316,73 @@ public function setSender($sender) } /** - * Gets templateName + * Gets template_name * * @return string */ public function getTemplateName() { - return $this->container['templateName']; + return $this->container['template_name']; } /** - * Sets templateName + * Sets template_name * - * @param string $templateName Name of the template + * @param string $template_name Name of the template * * @return $this */ - public function setTemplateName($templateName) + public function setTemplateName($template_name) { - $this->container['templateName'] = $templateName; + $this->container['template_name'] = $template_name; return $this; } /** - * Gets htmlContent + * Gets html_content * * @return string */ public function getHtmlContent() { - return $this->container['htmlContent']; + return $this->container['html_content']; } /** - * Sets htmlContent + * Sets html_content * - * @param string $htmlContent Body of the message (HTML version). The field must have more than 10 characters. REQUIRED if htmlUrl is empty + * @param string $html_content Body of the message (HTML version). The field must have more than 10 characters. REQUIRED if htmlUrl is empty * * @return $this */ - public function setHtmlContent($htmlContent) + public function setHtmlContent($html_content) { - $this->container['htmlContent'] = $htmlContent; + $this->container['html_content'] = $html_content; return $this; } /** - * Gets htmlUrl + * Gets html_url * * @return string */ public function getHtmlUrl() { - return $this->container['htmlUrl']; + return $this->container['html_url']; } /** - * Sets htmlUrl + * Sets html_url * - * @param string $htmlUrl Url which contents the body of the email message. REQUIRED if htmlContent is empty + * @param string $html_url Url which contents the body of the email message. REQUIRED if htmlContent is empty * * @return $this */ - public function setHtmlUrl($htmlUrl) + public function setHtmlUrl($html_url) { - $this->container['htmlUrl'] = $htmlUrl; + $this->container['html_url'] = $html_url; return $this; } @@ -412,97 +412,97 @@ public function setSubject($subject) } /** - * Gets replyTo + * Gets reply_to * * @return string */ public function getReplyTo() { - return $this->container['replyTo']; + return $this->container['reply_to']; } /** - * Sets replyTo + * Sets reply_to * - * @param string $replyTo Email on which campaign recipients will be able to reply to + * @param string $reply_to Email on which campaign recipients will be able to reply to * * @return $this */ - public function setReplyTo($replyTo) + public function setReplyTo($reply_to) { - $this->container['replyTo'] = $replyTo; + $this->container['reply_to'] = $reply_to; return $this; } /** - * Gets toField + * Gets to_field * * @return string */ public function getToField() { - return $this->container['toField']; + return $this->container['to_field']; } /** - * Sets toField + * Sets to_field * - * @param string $toField To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization + * @param string $to_field To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization * * @return $this */ - public function setToField($toField) + public function setToField($to_field) { - $this->container['toField'] = $toField; + $this->container['to_field'] = $to_field; return $this; } /** - * Gets attachmentUrl + * Gets attachment_url * * @return string */ public function getAttachmentUrl() { - return $this->container['attachmentUrl']; + return $this->container['attachment_url']; } /** - * Sets attachmentUrl + * Sets attachment_url * - * @param string $attachmentUrl Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps + * @param string $attachment_url Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps * * @return $this */ - public function setAttachmentUrl($attachmentUrl) + public function setAttachmentUrl($attachment_url) { - $this->container['attachmentUrl'] = $attachmentUrl; + $this->container['attachment_url'] = $attachment_url; return $this; } /** - * Gets isActive + * Gets is_active * * @return bool */ public function getIsActive() { - return $this->container['isActive']; + return $this->container['is_active']; } /** - * Sets isActive + * Sets is_active * - * @param bool $isActive Status of template. isActive = true means template is active and isActive = false means template is inactive + * @param bool $is_active Status of template. isActive = true means template is active and isActive = false means template is inactive * * @return $this */ - public function setIsActive($isActive) + public function setIsActive($is_active) { - $this->container['isActive'] = $isActive; + $this->container['is_active'] = $is_active; return $this; } @@ -513,6 +513,7 @@ public function setIsActive($isActive) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -525,6 +526,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -538,6 +540,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -554,6 +557,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/CreateSmtpTemplateSender.php b/lib/Model/CreateSmtpTemplateSender.php index 3fb1f512..171a0121 100644 --- a/lib/Model/CreateSmtpTemplateSender.php +++ b/lib/Model/CreateSmtpTemplateSender.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -36,7 +36,7 @@ * CreateSmtpTemplateSender Class Doc Comment * * @category Class - * @description Sender details including id or email and name (optional). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example `{\"name\":\"xyz\", \"email\":\"example@abc.com\"}` , `{\"name\":\"xyz\", \"id\":123}` + * @description Sender details including id or email and name (optional). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example `{\"name\":\"xyz\", \"email\":\"example@abc.com\"}` , `{\"name\":\"xyz\", \"id\":123}` * @package SendinBlue\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen @@ -295,6 +295,7 @@ public function setId($id) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -307,6 +308,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -320,6 +322,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -336,6 +339,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/CreateSubAccount.php b/lib/Model/CreateSubAccount.php deleted file mode 100644 index f9d15de3..00000000 --- a/lib/Model/CreateSubAccount.php +++ /dev/null @@ -1,437 +0,0 @@ - 'string', - 'email' => 'string', - 'language' => 'string', - 'timezone' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'companyName' => null, - 'email' => null, - 'language' => null, - 'timezone' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'companyName' => 'companyName', - 'email' => 'email', - 'language' => 'language', - 'timezone' => 'timezone' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'companyName' => 'setCompanyName', - 'email' => 'setEmail', - 'language' => 'setLanguage', - 'timezone' => 'setTimezone' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'companyName' => 'getCompanyName', - 'email' => 'getEmail', - 'language' => 'getLanguage', - 'timezone' => 'getTimezone' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - const LANGUAGE_EN = 'en'; - const LANGUAGE_FR = 'fr'; - const LANGUAGE_IT = 'it'; - const LANGUAGE_ES = 'es'; - const LANGUAGE_PT = 'pt'; - const LANGUAGE_DE = 'de'; - - - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getLanguageAllowableValues() - { - return [ - self::LANGUAGE_EN, - self::LANGUAGE_FR, - self::LANGUAGE_IT, - self::LANGUAGE_ES, - self::LANGUAGE_PT, - self::LANGUAGE_DE, - ]; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['companyName'] = isset($data['companyName']) ? $data['companyName'] : null; - $this->container['email'] = isset($data['email']) ? $data['email'] : null; - $this->container['language'] = isset($data['language']) ? $data['language'] : null; - $this->container['timezone'] = isset($data['timezone']) ? $data['timezone'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['companyName'] === null) { - $invalidProperties[] = "'companyName' can't be null"; - } - if ($this->container['email'] === null) { - $invalidProperties[] = "'email' can't be null"; - } - $allowedValues = $this->getLanguageAllowableValues(); - if (!is_null($this->container['language']) && !in_array($this->container['language'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value for 'language', must be one of '%s'", - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets companyName - * - * @return string - */ - public function getCompanyName() - { - return $this->container['companyName']; - } - - /** - * Sets companyName - * - * @param string $companyName Set the name of the sub-account company - * - * @return $this - */ - public function setCompanyName($companyName) - { - $this->container['companyName'] = $companyName; - - return $this; - } - - /** - * Gets email - * - * @return string - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string $email Email address for the organization - * - * @return $this - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets language - * - * @return string - */ - public function getLanguage() - { - return $this->container['language']; - } - - /** - * Sets language - * - * @param string $language Set the language of the sub-account - * - * @return $this - */ - public function setLanguage($language) - { - $allowedValues = $this->getLanguageAllowableValues(); - if (!is_null($language) && !in_array($language, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value for 'language', must be one of '%s'", - implode("', '", $allowedValues) - ) - ); - } - $this->container['language'] = $language; - - return $this; - } - - /** - * Gets timezone - * - * @return string - */ - public function getTimezone() - { - return $this->container['timezone']; - } - - /** - * Sets timezone - * - * @param string $timezone Set the timezone of the sub-account - * - * @return $this - */ - public function setTimezone($timezone) - { - $this->container['timezone'] = $timezone; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/CreateSubAccountResponse.php b/lib/Model/CreateSubAccountResponse.php deleted file mode 100644 index 472c89bb..00000000 --- a/lib/Model/CreateSubAccountResponse.php +++ /dev/null @@ -1,304 +0,0 @@ - 'int' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'id' => 'int64' - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'id' => 'id' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'id' => 'setId' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'id' => 'getId' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['id'] = isset($data['id']) ? $data['id'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets id - * - * @return int - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param int $id ID of the sub-account created - * - * @return $this - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/CreateUpdateContactModel.php b/lib/Model/CreateUpdateContactModel.php index fbf8e2b0..2866830f 100644 --- a/lib/Model/CreateUpdateContactModel.php +++ b/lib/Model/CreateUpdateContactModel.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -234,6 +234,7 @@ public function setId($id) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -246,6 +247,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -259,6 +261,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -275,6 +278,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/CreateUpdateFolder.php b/lib/Model/CreateUpdateFolder.php index 86a0b645..9c0b3859 100644 --- a/lib/Model/CreateUpdateFolder.php +++ b/lib/Model/CreateUpdateFolder.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -234,6 +234,7 @@ public function setName($name) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -246,6 +247,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -259,6 +261,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -275,6 +278,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/CreateWebhook.php b/lib/Model/CreateWebhook.php index 3d0fe5af..accc3784 100644 --- a/lib/Model/CreateWebhook.php +++ b/lib/Model/CreateWebhook.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -60,8 +60,7 @@ class CreateWebhook implements ModelInterface, ArrayAccess 'url' => 'string', 'description' => 'string', 'events' => 'string[]', - 'type' => 'string', - 'domain' => 'string' + 'type' => 'string' ]; /** @@ -73,8 +72,7 @@ class CreateWebhook implements ModelInterface, ArrayAccess 'url' => 'url', 'description' => null, 'events' => null, - 'type' => null, - 'domain' => null + 'type' => null ]; /** @@ -107,8 +105,7 @@ public static function swaggerFormats() 'url' => 'url', 'description' => 'description', 'events' => 'events', - 'type' => 'type', - 'domain' => 'domain' + 'type' => 'type' ]; /** @@ -120,8 +117,7 @@ public static function swaggerFormats() 'url' => 'setUrl', 'description' => 'setDescription', 'events' => 'setEvents', - 'type' => 'setType', - 'domain' => 'setDomain' + 'type' => 'setType' ]; /** @@ -133,8 +129,7 @@ public static function swaggerFormats() 'url' => 'getUrl', 'description' => 'getDescription', 'events' => 'getEvents', - 'type' => 'getType', - 'domain' => 'getDomain' + 'type' => 'getType' ]; /** @@ -194,10 +189,8 @@ public function getModelName() const EVENTS_LIST_ADDITION = 'listAddition'; const EVENTS_CONTACT_UPDATED = 'contactUpdated'; const EVENTS_CONTACT_DELETED = 'contactDeleted'; - const EVENTS_INBOUND_EMAIL_PROCESSED = 'inboundEmailProcessed'; const TYPE_TRANSACTIONAL = 'transactional'; const TYPE_MARKETING = 'marketing'; - const TYPE_INBOUND = 'inbound'; @@ -225,7 +218,6 @@ public function getEventsAllowableValues() self::EVENTS_LIST_ADDITION, self::EVENTS_CONTACT_UPDATED, self::EVENTS_CONTACT_DELETED, - self::EVENTS_INBOUND_EMAIL_PROCESSED, ]; } @@ -239,7 +231,6 @@ public function getTypeAllowableValues() return [ self::TYPE_TRANSACTIONAL, self::TYPE_MARKETING, - self::TYPE_INBOUND, ]; } @@ -263,7 +254,6 @@ public function __construct(array $data = null) $this->container['description'] = isset($data['description']) ? $data['description'] : null; $this->container['events'] = isset($data['events']) ? $data['events'] : null; $this->container['type'] = isset($data['type']) ? $data['type'] : 'transactional'; - $this->container['domain'] = isset($data['domain']) ? $data['domain'] : null; } /** @@ -365,7 +355,7 @@ public function getEvents() /** * Sets events * - * @param string[] $events - Events triggering the webhook. Possible values for **Transactional** type webhook: #### `sent` OR `request`, `delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and `unsubscribed` - Possible values for **Marketing** type webhook: #### `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`, `listAddition` & `delivered` - Possible values for **Inbound** type webhook: #### `inboundEmailProcessed` + * @param string[] $events Events triggering the webhook. Possible values for Transactional type webhook – `sent` OR `request`, `delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and `unsubscribed` and possible values for Marketing type webhook – `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`, `listAddition` & `delivered` * * @return $this */ @@ -417,30 +407,6 @@ public function setType($type) return $this; } - - /** - * Gets domain - * - * @return string - */ - public function getDomain() - { - return $this->container['domain']; - } - - /** - * Sets domain - * - * @param string $domain Inbound domain of webhook, required in case of event type `inbound` - * - * @return $this - */ - public function setDomain($domain) - { - $this->container['domain'] = $domain; - - return $this; - } /** * Returns true if offset exists. False otherwise. * @@ -448,6 +414,7 @@ public function setDomain($domain) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -460,6 +427,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -473,6 +441,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -489,6 +458,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/CreatedProcessId.php b/lib/Model/CreatedProcessId.php index 4d102443..bf324047 100644 --- a/lib/Model/CreatedProcessId.php +++ b/lib/Model/CreatedProcessId.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -57,7 +57,7 @@ class CreatedProcessId implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'processId' => 'int' + 'process_id' => 'int' ]; /** @@ -66,7 +66,7 @@ class CreatedProcessId implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'processId' => 'int64' + 'process_id' => 'int64' ]; /** @@ -96,7 +96,7 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'processId' => 'processId' + 'process_id' => 'processId' ]; /** @@ -105,7 +105,7 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'processId' => 'setProcessId' + 'process_id' => 'setProcessId' ]; /** @@ -114,7 +114,7 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'processId' => 'getProcessId' + 'process_id' => 'getProcessId' ]; /** @@ -177,7 +177,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['processId'] = isset($data['processId']) ? $data['processId'] : null; + $this->container['process_id'] = isset($data['process_id']) ? $data['process_id'] : null; } /** @@ -189,8 +189,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['processId'] === null) { - $invalidProperties[] = "'processId' can't be null"; + if ($this->container['process_id'] === null) { + $invalidProperties[] = "'process_id' can't be null"; } return $invalidProperties; } @@ -208,25 +208,25 @@ public function valid() /** - * Gets processId + * Gets process_id * * @return int */ public function getProcessId() { - return $this->container['processId']; + return $this->container['process_id']; } /** - * Sets processId + * Sets process_id * - * @param int $processId Id of the process created + * @param int $process_id Id of the process created * * @return $this */ - public function setProcessId($processId) + public function setProcessId($process_id) { - $this->container['processId'] = $processId; + $this->container['process_id'] = $process_id; return $this; } @@ -237,6 +237,7 @@ public function setProcessId($processId) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -249,6 +250,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -262,6 +264,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -278,6 +281,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/DeleteHardbounces.php b/lib/Model/DeleteHardbounces.php index 96ee340c..a68ad213 100644 --- a/lib/Model/DeleteHardbounces.php +++ b/lib/Model/DeleteHardbounces.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -57,9 +57,9 @@ class DeleteHardbounces implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'startDate' => 'string', - 'endDate' => 'string', - 'contactEmail' => 'string' + 'start_date' => 'string', + 'end_date' => 'string', + 'contact_email' => 'string' ]; /** @@ -68,9 +68,9 @@ class DeleteHardbounces implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'startDate' => null, - 'endDate' => null, - 'contactEmail' => 'email' + 'start_date' => null, + 'end_date' => null, + 'contact_email' => 'email' ]; /** @@ -100,9 +100,9 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'startDate' => 'startDate', - 'endDate' => 'endDate', - 'contactEmail' => 'contactEmail' + 'start_date' => 'startDate', + 'end_date' => 'endDate', + 'contact_email' => 'contactEmail' ]; /** @@ -111,9 +111,9 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'startDate' => 'setStartDate', - 'endDate' => 'setEndDate', - 'contactEmail' => 'setContactEmail' + 'start_date' => 'setStartDate', + 'end_date' => 'setEndDate', + 'contact_email' => 'setContactEmail' ]; /** @@ -122,9 +122,9 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'startDate' => 'getStartDate', - 'endDate' => 'getEndDate', - 'contactEmail' => 'getContactEmail' + 'start_date' => 'getStartDate', + 'end_date' => 'getEndDate', + 'contact_email' => 'getContactEmail' ]; /** @@ -187,9 +187,9 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['startDate'] = isset($data['startDate']) ? $data['startDate'] : null; - $this->container['endDate'] = isset($data['endDate']) ? $data['endDate'] : null; - $this->container['contactEmail'] = isset($data['contactEmail']) ? $data['contactEmail'] : null; + $this->container['start_date'] = isset($data['start_date']) ? $data['start_date'] : null; + $this->container['end_date'] = isset($data['end_date']) ? $data['end_date'] : null; + $this->container['contact_email'] = isset($data['contact_email']) ? $data['contact_email'] : null; } /** @@ -217,73 +217,73 @@ public function valid() /** - * Gets startDate + * Gets start_date * * @return string */ public function getStartDate() { - return $this->container['startDate']; + return $this->container['start_date']; } /** - * Sets startDate + * Sets start_date * - * @param string $startDate Starting date (YYYY-MM-DD) of the time period for deletion. The hardbounces occurred after this date will be deleted. Must be less than or equal to the endDate + * @param string $start_date Starting date (YYYY-MM-DD) of the time period for deletion. The hardbounces occurred after this date will be deleted. Must be less than or equal to the endDate * * @return $this */ - public function setStartDate($startDate) + public function setStartDate($start_date) { - $this->container['startDate'] = $startDate; + $this->container['start_date'] = $start_date; return $this; } /** - * Gets endDate + * Gets end_date * * @return string */ public function getEndDate() { - return $this->container['endDate']; + return $this->container['end_date']; } /** - * Sets endDate + * Sets end_date * - * @param string $endDate Ending date (YYYY-MM-DD) of the time period for deletion. The hardbounces until this date will be deleted. Must be greater than or equal to the startDate + * @param string $end_date Ending date (YYYY-MM-DD) of the time period for deletion. The hardbounces until this date will be deleted. Must be greater than or equal to the startDate * * @return $this */ - public function setEndDate($endDate) + public function setEndDate($end_date) { - $this->container['endDate'] = $endDate; + $this->container['end_date'] = $end_date; return $this; } /** - * Gets contactEmail + * Gets contact_email * * @return string */ public function getContactEmail() { - return $this->container['contactEmail']; + return $this->container['contact_email']; } /** - * Sets contactEmail + * Sets contact_email * - * @param string $contactEmail Target a specific email address + * @param string $contact_email Target a specific email address * * @return $this */ - public function setContactEmail($contactEmail) + public function setContactEmail($contact_email) { - $this->container['contactEmail'] = $contactEmail; + $this->container['contact_email'] = $contact_email; return $this; } @@ -294,6 +294,7 @@ public function setContactEmail($contactEmail) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -306,6 +307,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -319,6 +321,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -335,6 +338,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/EmailExportRecipients.php b/lib/Model/EmailExportRecipients.php index 74c9bad8..4e9f1aba 100644 --- a/lib/Model/EmailExportRecipients.php +++ b/lib/Model/EmailExportRecipients.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -57,8 +57,8 @@ class EmailExportRecipients implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'notifyURL' => 'string', - 'recipientsType' => 'string' + 'notify_url' => 'string', + 'recipients_type' => 'string' ]; /** @@ -67,8 +67,8 @@ class EmailExportRecipients implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'notifyURL' => 'url', - 'recipientsType' => null + 'notify_url' => 'url', + 'recipients_type' => null ]; /** @@ -98,8 +98,8 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'notifyURL' => 'notifyURL', - 'recipientsType' => 'recipientsType' + 'notify_url' => 'notifyURL', + 'recipients_type' => 'recipientsType' ]; /** @@ -108,8 +108,8 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'notifyURL' => 'setNotifyURL', - 'recipientsType' => 'setRecipientsType' + 'notify_url' => 'setNotifyUrl', + 'recipients_type' => 'setRecipientsType' ]; /** @@ -118,8 +118,8 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'notifyURL' => 'getNotifyURL', - 'recipientsType' => 'getRecipientsType' + 'notify_url' => 'getNotifyUrl', + 'recipients_type' => 'getRecipientsType' ]; /** @@ -209,8 +209,8 @@ public function getRecipientsTypeAllowableValues() */ public function __construct(array $data = null) { - $this->container['notifyURL'] = isset($data['notifyURL']) ? $data['notifyURL'] : null; - $this->container['recipientsType'] = isset($data['recipientsType']) ? $data['recipientsType'] : null; + $this->container['notify_url'] = isset($data['notify_url']) ? $data['notify_url'] : null; + $this->container['recipients_type'] = isset($data['recipients_type']) ? $data['recipients_type'] : null; } /** @@ -222,13 +222,13 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['recipientsType'] === null) { - $invalidProperties[] = "'recipientsType' can't be null"; + if ($this->container['recipients_type'] === null) { + $invalidProperties[] = "'recipients_type' can't be null"; } $allowedValues = $this->getRecipientsTypeAllowableValues(); - if (!is_null($this->container['recipientsType']) && !in_array($this->container['recipientsType'], $allowedValues, true)) { + if (!is_null($this->container['recipients_type']) && !in_array($this->container['recipients_type'], $allowedValues, true)) { $invalidProperties[] = sprintf( - "invalid value for 'recipientsType', must be one of '%s'", + "invalid value for 'recipients_type', must be one of '%s'", implode("', '", $allowedValues) ); } @@ -249,58 +249,58 @@ public function valid() /** - * Gets notifyURL + * Gets notify_url * * @return string */ - public function getNotifyURL() + public function getNotifyUrl() { - return $this->container['notifyURL']; + return $this->container['notify_url']; } /** - * Sets notifyURL + * Sets notify_url * - * @param string $notifyURL Webhook called once the export process is finished. For reference, https://help.sendinblue.com/hc/en-us/articles/360007666479 + * @param string $notify_url Webhook called once the export process is finished. For reference, https://help.sendinblue.com/hc/en-us/articles/360007666479 * * @return $this */ - public function setNotifyURL($notifyURL) + public function setNotifyUrl($notify_url) { - $this->container['notifyURL'] = $notifyURL; + $this->container['notify_url'] = $notify_url; return $this; } /** - * Gets recipientsType + * Gets recipients_type * * @return string */ public function getRecipientsType() { - return $this->container['recipientsType']; + return $this->container['recipients_type']; } /** - * Sets recipientsType + * Sets recipients_type * - * @param string $recipientsType Type of recipients to export for a campaign + * @param string $recipients_type Type of recipients to export for a campaign * * @return $this */ - public function setRecipientsType($recipientsType) + public function setRecipientsType($recipients_type) { $allowedValues = $this->getRecipientsTypeAllowableValues(); - if (!in_array($recipientsType, $allowedValues, true)) { + if (!in_array($recipients_type, $allowedValues, true)) { throw new \InvalidArgumentException( sprintf( - "Invalid value for 'recipientsType', must be one of '%s'", + "Invalid value for 'recipients_type', must be one of '%s'", implode("', '", $allowedValues) ) ); } - $this->container['recipientsType'] = $recipientsType; + $this->container['recipients_type'] = $recipients_type; return $this; } @@ -311,6 +311,7 @@ public function setRecipientsType($recipientsType) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -323,6 +324,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -336,6 +338,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -352,6 +355,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/ErrorModel.php b/lib/Model/ErrorModel.php index 7105ec5c..d1d6b458 100644 --- a/lib/Model/ErrorModel.php +++ b/lib/Model/ErrorModel.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -328,6 +328,7 @@ public function setMessage($message) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -340,6 +341,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -353,6 +355,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -369,6 +372,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/FileData.php b/lib/Model/FileData.php deleted file mode 100644 index 019f8f12..00000000 --- a/lib/Model/FileData.php +++ /dev/null @@ -1,572 +0,0 @@ - 'string', - 'id' => 'string', - 'name' => 'string', - 'authorId' => 'string', - 'author' => 'object', - 'contactId' => 'int', - 'dealIds' => 'string[]', - 'size' => 'int', - 'createdAt' => '\DateTime', - 'updatedAt' => '\DateTime' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'url' => null, - 'id' => null, - 'name' => null, - 'authorId' => null, - 'author' => null, - 'contactId' => 'int64', - 'dealIds' => null, - 'size' => 'int64', - 'createdAt' => 'date-time', - 'updatedAt' => 'date-time' - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'url' => 'url', - 'id' => 'id', - 'name' => 'name', - 'authorId' => 'authorId', - 'author' => 'author', - 'contactId' => 'contactId', - 'dealIds' => 'dealIds', - 'size' => 'size', - 'createdAt' => 'createdAt', - 'updatedAt' => 'updatedAt' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'url' => 'setUrl', - 'id' => 'setId', - 'name' => 'setName', - 'authorId' => 'setAuthorId', - 'author' => 'setAuthor', - 'contactId' => 'setContactId', - 'dealIds' => 'setDealIds', - 'size' => 'setSize', - 'createdAt' => 'setCreatedAt', - 'updatedAt' => 'setUpdatedAt' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'url' => 'getUrl', - 'id' => 'getId', - 'name' => 'getName', - 'authorId' => 'getAuthorId', - 'author' => 'getAuthor', - 'contactId' => 'getContactId', - 'dealIds' => 'getDealIds', - 'size' => 'getSize', - 'createdAt' => 'getCreatedAt', - 'updatedAt' => 'getUpdatedAt' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['url'] = isset($data['url']) ? $data['url'] : null; - $this->container['id'] = isset($data['id']) ? $data['id'] : null; - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - $this->container['authorId'] = isset($data['authorId']) ? $data['authorId'] : null; - $this->container['author'] = isset($data['author']) ? $data['author'] : null; - $this->container['contactId'] = isset($data['contactId']) ? $data['contactId'] : null; - $this->container['dealIds'] = isset($data['dealIds']) ? $data['dealIds'] : null; - $this->container['size'] = isset($data['size']) ? $data['size'] : null; - $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; - $this->container['updatedAt'] = isset($data['updatedAt']) ? $data['updatedAt'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets url - * - * @return string - */ - public function getUrl() - { - return $this->container['url']; - } - - /** - * Sets url - * - * @param string $url Url of uploaded file - * - * @return $this - */ - public function setUrl($url) - { - $this->container['url'] = $url; - - return $this; - } - - /** - * Gets id - * - * @return string - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string $id Id of uploaded file - * - * @return $this - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name Name of uploaded file - * - * @return $this - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets authorId - * - * @return string - */ - public function getAuthorId() - { - return $this->container['authorId']; - } - - /** - * Sets authorId - * - * @param string $authorId Account id of user which created the file - * - * @return $this - */ - public function setAuthorId($authorId) - { - $this->container['authorId'] = $authorId; - - return $this; - } - - /** - * Gets author - * - * @return object - */ - public function getAuthor() - { - return $this->container['author']; - } - - /** - * Sets author - * - * @param object $author Account details of user which created the file - * - * @return $this - */ - public function setAuthor($author) - { - $this->container['author'] = $author; - - return $this; - } - - /** - * Gets contactId - * - * @return int - */ - public function getContactId() - { - return $this->container['contactId']; - } - - /** - * Sets contactId - * - * @param int $contactId Contact id of contact on which file is uploaded - * - * @return $this - */ - public function setContactId($contactId) - { - $this->container['contactId'] = $contactId; - - return $this; - } - - /** - * Gets dealIds - * - * @return string[] - */ - public function getDealIds() - { - return $this->container['dealIds']; - } - - /** - * Sets dealIds - * - * @param string[] $dealIds Deal ids linked to a file - * - * @return $this - */ - public function setDealIds($dealIds) - { - $this->container['dealIds'] = $dealIds; - - return $this; - } - - /** - * Gets size - * - * @return int - */ - public function getSize() - { - return $this->container['size']; - } - - /** - * Sets size - * - * @param int $size Size of file uploaded - * - * @return $this - */ - public function setSize($size) - { - $this->container['size'] = $size; - - return $this; - } - - /** - * Gets createdAt - * - * @return \DateTime - */ - public function getCreatedAt() - { - return $this->container['createdAt']; - } - - /** - * Sets createdAt - * - * @param \DateTime $createdAt File created date/time - * - * @return $this - */ - public function setCreatedAt($createdAt) - { - $this->container['createdAt'] = $createdAt; - - return $this; - } - - /** - * Gets updatedAt - * - * @return \DateTime - */ - public function getUpdatedAt() - { - return $this->container['updatedAt']; - } - - /** - * Sets updatedAt - * - * @param \DateTime $updatedAt File updated date/time - * - * @return $this - */ - public function setUpdatedAt($updatedAt) - { - $this->container['updatedAt'] = $updatedAt; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/GetAccount.php b/lib/Model/GetAccount.php index 1ef42ead..ede8316b 100644 --- a/lib/Model/GetAccount.php +++ b/lib/Model/GetAccount.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -57,7 +57,7 @@ class GetAccount extends GetExtendedClient protected static $swaggerTypes = [ 'plan' => '\SendinBlue\Client\Model\GetAccountPlan[]', 'relay' => '\SendinBlue\Client\Model\GetAccountRelay', - 'marketingAutomation' => '\SendinBlue\Client\Model\GetAccountMarketingAutomation' + 'marketing_automation' => '\SendinBlue\Client\Model\GetAccountMarketingAutomation' ]; /** @@ -68,7 +68,7 @@ class GetAccount extends GetExtendedClient protected static $swaggerFormats = [ 'plan' => null, 'relay' => null, - 'marketingAutomation' => null + 'marketing_automation' => null ]; /** @@ -100,7 +100,7 @@ public static function swaggerFormats() protected static $attributeMap = [ 'plan' => 'plan', 'relay' => 'relay', - 'marketingAutomation' => 'marketingAutomation' + 'marketing_automation' => 'marketingAutomation' ]; /** @@ -111,7 +111,7 @@ public static function swaggerFormats() protected static $setters = [ 'plan' => 'setPlan', 'relay' => 'setRelay', - 'marketingAutomation' => 'setMarketingAutomation' + 'marketing_automation' => 'setMarketingAutomation' ]; /** @@ -122,7 +122,7 @@ public static function swaggerFormats() protected static $getters = [ 'plan' => 'getPlan', 'relay' => 'getRelay', - 'marketingAutomation' => 'getMarketingAutomation' + 'marketing_automation' => 'getMarketingAutomation' ]; /** @@ -183,7 +183,7 @@ public function __construct(array $data = null) $this->container['plan'] = isset($data['plan']) ? $data['plan'] : null; $this->container['relay'] = isset($data['relay']) ? $data['relay'] : null; - $this->container['marketingAutomation'] = isset($data['marketingAutomation']) ? $data['marketingAutomation'] : null; + $this->container['marketing_automation'] = isset($data['marketing_automation']) ? $data['marketing_automation'] : null; } /** @@ -265,25 +265,25 @@ public function setRelay($relay) } /** - * Gets marketingAutomation + * Gets marketing_automation * * @return \SendinBlue\Client\Model\GetAccountMarketingAutomation */ public function getMarketingAutomation() { - return $this->container['marketingAutomation']; + return $this->container['marketing_automation']; } /** - * Sets marketingAutomation + * Sets marketing_automation * - * @param \SendinBlue\Client\Model\GetAccountMarketingAutomation $marketingAutomation marketingAutomation + * @param \SendinBlue\Client\Model\GetAccountMarketingAutomation $marketing_automation marketing_automation * * @return $this */ - public function setMarketingAutomation($marketingAutomation) + public function setMarketingAutomation($marketing_automation) { - $this->container['marketingAutomation'] = $marketingAutomation; + $this->container['marketing_automation'] = $marketing_automation; return $this; } @@ -294,6 +294,7 @@ public function setMarketingAutomation($marketingAutomation) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -306,6 +307,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -319,6 +321,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -335,6 +338,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetAccountMarketingAutomation.php b/lib/Model/GetAccountMarketingAutomation.php index b8bebd3d..d8794c18 100644 --- a/lib/Model/GetAccountMarketingAutomation.php +++ b/lib/Model/GetAccountMarketingAutomation.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -267,6 +267,7 @@ public function setEnabled($enabled) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -279,6 +280,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -292,6 +294,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -308,6 +311,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetAccountPlan.php b/lib/Model/GetAccountPlan.php index e13e2717..7e6a876f 100644 --- a/lib/Model/GetAccountPlan.php +++ b/lib/Model/GetAccountPlan.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -58,11 +58,11 @@ class GetAccountPlan implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'type' => 'string', - 'creditsType' => 'string', + 'credits_type' => 'string', 'credits' => 'float', - 'startDate' => '\DateTime', - 'endDate' => '\DateTime', - 'userLimit' => 'int' + 'start_date' => '\DateTime', + 'end_date' => '\DateTime', + 'user_limit' => 'int' ]; /** @@ -72,11 +72,11 @@ class GetAccountPlan implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'type' => null, - 'creditsType' => null, + 'credits_type' => null, 'credits' => 'float', - 'startDate' => 'date', - 'endDate' => 'date', - 'userLimit' => null + 'start_date' => 'date', + 'end_date' => 'date', + 'user_limit' => null ]; /** @@ -107,11 +107,11 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'type' => 'type', - 'creditsType' => 'creditsType', + 'credits_type' => 'creditsType', 'credits' => 'credits', - 'startDate' => 'startDate', - 'endDate' => 'endDate', - 'userLimit' => 'userLimit' + 'start_date' => 'startDate', + 'end_date' => 'endDate', + 'user_limit' => 'userLimit' ]; /** @@ -121,11 +121,11 @@ public static function swaggerFormats() */ protected static $setters = [ 'type' => 'setType', - 'creditsType' => 'setCreditsType', + 'credits_type' => 'setCreditsType', 'credits' => 'setCredits', - 'startDate' => 'setStartDate', - 'endDate' => 'setEndDate', - 'userLimit' => 'setUserLimit' + 'start_date' => 'setStartDate', + 'end_date' => 'setEndDate', + 'user_limit' => 'setUserLimit' ]; /** @@ -135,11 +135,11 @@ public static function swaggerFormats() */ protected static $getters = [ 'type' => 'getType', - 'creditsType' => 'getCreditsType', + 'credits_type' => 'getCreditsType', 'credits' => 'getCredits', - 'startDate' => 'getStartDate', - 'endDate' => 'getEndDate', - 'userLimit' => 'getUserLimit' + 'start_date' => 'getStartDate', + 'end_date' => 'getEndDate', + 'user_limit' => 'getUserLimit' ]; /** @@ -237,11 +237,11 @@ public function getCreditsTypeAllowableValues() public function __construct(array $data = null) { $this->container['type'] = isset($data['type']) ? $data['type'] : null; - $this->container['creditsType'] = isset($data['creditsType']) ? $data['creditsType'] : null; + $this->container['credits_type'] = isset($data['credits_type']) ? $data['credits_type'] : null; $this->container['credits'] = isset($data['credits']) ? $data['credits'] : null; - $this->container['startDate'] = isset($data['startDate']) ? $data['startDate'] : null; - $this->container['endDate'] = isset($data['endDate']) ? $data['endDate'] : null; - $this->container['userLimit'] = isset($data['userLimit']) ? $data['userLimit'] : null; + $this->container['start_date'] = isset($data['start_date']) ? $data['start_date'] : null; + $this->container['end_date'] = isset($data['end_date']) ? $data['end_date'] : null; + $this->container['user_limit'] = isset($data['user_limit']) ? $data['user_limit'] : null; } /** @@ -264,13 +264,13 @@ public function listInvalidProperties() ); } - if ($this->container['creditsType'] === null) { - $invalidProperties[] = "'creditsType' can't be null"; + if ($this->container['credits_type'] === null) { + $invalidProperties[] = "'credits_type' can't be null"; } $allowedValues = $this->getCreditsTypeAllowableValues(); - if (!is_null($this->container['creditsType']) && !in_array($this->container['creditsType'], $allowedValues, true)) { + if (!is_null($this->container['credits_type']) && !in_array($this->container['credits_type'], $allowedValues, true)) { $invalidProperties[] = sprintf( - "invalid value for 'creditsType', must be one of '%s'", + "invalid value for 'credits_type', must be one of '%s'", implode("', '", $allowedValues) ); } @@ -327,34 +327,34 @@ public function setType($type) } /** - * Gets creditsType + * Gets credits_type * * @return string */ public function getCreditsType() { - return $this->container['creditsType']; + return $this->container['credits_type']; } /** - * Sets creditsType + * Sets credits_type * - * @param string $creditsType This is the type of the credit, \"Send Limit\" is one of the possible types of credit of a user. \"Send Limit\" implies the total number of emails you can send to the subscribers in your account. + * @param string $credits_type This is the type of the credit, \"Send Limit\" is one of the possible types of credit of a user. \"Send Limit\" implies the total number of emails you can send to the subscribers in your account. * * @return $this */ - public function setCreditsType($creditsType) + public function setCreditsType($credits_type) { $allowedValues = $this->getCreditsTypeAllowableValues(); - if (!in_array($creditsType, $allowedValues, true)) { + if (!in_array($credits_type, $allowedValues, true)) { throw new \InvalidArgumentException( sprintf( - "Invalid value for 'creditsType', must be one of '%s'", + "Invalid value for 'credits_type', must be one of '%s'", implode("', '", $allowedValues) ) ); } - $this->container['creditsType'] = $creditsType; + $this->container['credits_type'] = $credits_type; return $this; } @@ -384,73 +384,73 @@ public function setCredits($credits) } /** - * Gets startDate + * Gets start_date * * @return \DateTime */ public function getStartDate() { - return $this->container['startDate']; + return $this->container['start_date']; } /** - * Sets startDate + * Sets start_date * - * @param \DateTime $startDate Date of the period from which the plan will start (only available for \"subscription\" and \"reseller\" plan type) + * @param \DateTime $start_date Date of the period from which the plan will start (only available for \"subscription\" and \"reseller\" plan type) * * @return $this */ - public function setStartDate($startDate) + public function setStartDate($start_date) { - $this->container['startDate'] = $startDate; + $this->container['start_date'] = $start_date; return $this; } /** - * Gets endDate + * Gets end_date * * @return \DateTime */ public function getEndDate() { - return $this->container['endDate']; + return $this->container['end_date']; } /** - * Sets endDate + * Sets end_date * - * @param \DateTime $endDate Date of the period from which the plan will end (only available for \"subscription\" and \"reseller\" plan type) + * @param \DateTime $end_date Date of the period from which the plan will end (only available for \"subscription\" and \"reseller\" plan type) * * @return $this */ - public function setEndDate($endDate) + public function setEndDate($end_date) { - $this->container['endDate'] = $endDate; + $this->container['end_date'] = $end_date; return $this; } /** - * Gets userLimit + * Gets user_limit * * @return int */ public function getUserLimit() { - return $this->container['userLimit']; + return $this->container['user_limit']; } /** - * Sets userLimit + * Sets user_limit * - * @param int $userLimit Only in case of reseller account. It implies the total number of child accounts you can add to your account. + * @param int $user_limit Only in case of reseller account. It implies the total number of child accounts you can add to your account. * * @return $this */ - public function setUserLimit($userLimit) + public function setUserLimit($user_limit) { - $this->container['userLimit'] = $userLimit; + $this->container['user_limit'] = $user_limit; return $this; } @@ -461,6 +461,7 @@ public function setUserLimit($userLimit) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -473,6 +474,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -486,6 +488,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -502,6 +505,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetAccountRelay.php b/lib/Model/GetAccountRelay.php index 8b3be135..99b0820d 100644 --- a/lib/Model/GetAccountRelay.php +++ b/lib/Model/GetAccountRelay.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -271,6 +271,7 @@ public function setData($data) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -283,6 +284,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -296,6 +298,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -312,6 +315,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetAccountRelayData.php b/lib/Model/GetAccountRelayData.php index 29ec4706..30b24341 100644 --- a/lib/Model/GetAccountRelayData.php +++ b/lib/Model/GetAccountRelayData.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -58,7 +58,7 @@ class GetAccountRelayData implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'userName' => 'string', + 'user_name' => 'string', 'relay' => 'string', 'port' => 'int' ]; @@ -69,7 +69,7 @@ class GetAccountRelayData implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'userName' => 'email', + 'user_name' => 'email', 'relay' => null, 'port' => null ]; @@ -101,7 +101,7 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'userName' => 'userName', + 'user_name' => 'userName', 'relay' => 'relay', 'port' => 'port' ]; @@ -112,7 +112,7 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'userName' => 'setUserName', + 'user_name' => 'setUserName', 'relay' => 'setRelay', 'port' => 'setPort' ]; @@ -123,7 +123,7 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'userName' => 'getUserName', + 'user_name' => 'getUserName', 'relay' => 'getRelay', 'port' => 'getPort' ]; @@ -188,7 +188,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['userName'] = isset($data['userName']) ? $data['userName'] : null; + $this->container['user_name'] = isset($data['user_name']) ? $data['user_name'] : null; $this->container['relay'] = isset($data['relay']) ? $data['relay'] : null; $this->container['port'] = isset($data['port']) ? $data['port'] : null; } @@ -202,8 +202,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['userName'] === null) { - $invalidProperties[] = "'userName' can't be null"; + if ($this->container['user_name'] === null) { + $invalidProperties[] = "'user_name' can't be null"; } if ($this->container['relay'] === null) { $invalidProperties[] = "'relay' can't be null"; @@ -227,25 +227,25 @@ public function valid() /** - * Gets userName + * Gets user_name * * @return string */ public function getUserName() { - return $this->container['userName']; + return $this->container['user_name']; } /** - * Sets userName + * Sets user_name * - * @param string $userName Email to use as login on transactional platform + * @param string $user_name Email to use as login on transactional platform * * @return $this */ - public function setUserName($userName) + public function setUserName($user_name) { - $this->container['userName'] = $userName; + $this->container['user_name'] = $user_name; return $this; } @@ -304,6 +304,7 @@ public function setPort($port) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -316,6 +317,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -329,6 +331,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -345,6 +348,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetAggregatedReport.php b/lib/Model/GetAggregatedReport.php index 4b2d14f1..dbc69812 100644 --- a/lib/Model/GetAggregatedReport.php +++ b/lib/Model/GetAggregatedReport.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -60,13 +60,13 @@ class GetAggregatedReport implements ModelInterface, ArrayAccess 'range' => 'string', 'requests' => 'int', 'delivered' => 'int', - 'hardBounces' => 'int', - 'softBounces' => 'int', + 'hard_bounces' => 'int', + 'soft_bounces' => 'int', 'clicks' => 'int', - 'uniqueClicks' => 'int', + 'unique_clicks' => 'int', 'opens' => 'int', - 'uniqueOpens' => 'int', - 'spamReports' => 'int', + 'unique_opens' => 'int', + 'spam_reports' => 'int', 'blocked' => 'int', 'invalid' => 'int', 'unsubscribed' => 'int' @@ -81,13 +81,13 @@ class GetAggregatedReport implements ModelInterface, ArrayAccess 'range' => null, 'requests' => 'int64', 'delivered' => 'int64', - 'hardBounces' => 'int64', - 'softBounces' => 'int64', + 'hard_bounces' => 'int64', + 'soft_bounces' => 'int64', 'clicks' => 'int64', - 'uniqueClicks' => 'int64', + 'unique_clicks' => 'int64', 'opens' => 'int64', - 'uniqueOpens' => 'int64', - 'spamReports' => 'int64', + 'unique_opens' => 'int64', + 'spam_reports' => 'int64', 'blocked' => 'int64', 'invalid' => 'int64', 'unsubscribed' => 'int64' @@ -123,13 +123,13 @@ public static function swaggerFormats() 'range' => 'range', 'requests' => 'requests', 'delivered' => 'delivered', - 'hardBounces' => 'hardBounces', - 'softBounces' => 'softBounces', + 'hard_bounces' => 'hardBounces', + 'soft_bounces' => 'softBounces', 'clicks' => 'clicks', - 'uniqueClicks' => 'uniqueClicks', + 'unique_clicks' => 'uniqueClicks', 'opens' => 'opens', - 'uniqueOpens' => 'uniqueOpens', - 'spamReports' => 'spamReports', + 'unique_opens' => 'uniqueOpens', + 'spam_reports' => 'spamReports', 'blocked' => 'blocked', 'invalid' => 'invalid', 'unsubscribed' => 'unsubscribed' @@ -144,13 +144,13 @@ public static function swaggerFormats() 'range' => 'setRange', 'requests' => 'setRequests', 'delivered' => 'setDelivered', - 'hardBounces' => 'setHardBounces', - 'softBounces' => 'setSoftBounces', + 'hard_bounces' => 'setHardBounces', + 'soft_bounces' => 'setSoftBounces', 'clicks' => 'setClicks', - 'uniqueClicks' => 'setUniqueClicks', + 'unique_clicks' => 'setUniqueClicks', 'opens' => 'setOpens', - 'uniqueOpens' => 'setUniqueOpens', - 'spamReports' => 'setSpamReports', + 'unique_opens' => 'setUniqueOpens', + 'spam_reports' => 'setSpamReports', 'blocked' => 'setBlocked', 'invalid' => 'setInvalid', 'unsubscribed' => 'setUnsubscribed' @@ -165,13 +165,13 @@ public static function swaggerFormats() 'range' => 'getRange', 'requests' => 'getRequests', 'delivered' => 'getDelivered', - 'hardBounces' => 'getHardBounces', - 'softBounces' => 'getSoftBounces', + 'hard_bounces' => 'getHardBounces', + 'soft_bounces' => 'getSoftBounces', 'clicks' => 'getClicks', - 'uniqueClicks' => 'getUniqueClicks', + 'unique_clicks' => 'getUniqueClicks', 'opens' => 'getOpens', - 'uniqueOpens' => 'getUniqueOpens', - 'spamReports' => 'getSpamReports', + 'unique_opens' => 'getUniqueOpens', + 'spam_reports' => 'getSpamReports', 'blocked' => 'getBlocked', 'invalid' => 'getInvalid', 'unsubscribed' => 'getUnsubscribed' @@ -240,13 +240,13 @@ public function __construct(array $data = null) $this->container['range'] = isset($data['range']) ? $data['range'] : null; $this->container['requests'] = isset($data['requests']) ? $data['requests'] : null; $this->container['delivered'] = isset($data['delivered']) ? $data['delivered'] : null; - $this->container['hardBounces'] = isset($data['hardBounces']) ? $data['hardBounces'] : null; - $this->container['softBounces'] = isset($data['softBounces']) ? $data['softBounces'] : null; + $this->container['hard_bounces'] = isset($data['hard_bounces']) ? $data['hard_bounces'] : null; + $this->container['soft_bounces'] = isset($data['soft_bounces']) ? $data['soft_bounces'] : null; $this->container['clicks'] = isset($data['clicks']) ? $data['clicks'] : null; - $this->container['uniqueClicks'] = isset($data['uniqueClicks']) ? $data['uniqueClicks'] : null; + $this->container['unique_clicks'] = isset($data['unique_clicks']) ? $data['unique_clicks'] : null; $this->container['opens'] = isset($data['opens']) ? $data['opens'] : null; - $this->container['uniqueOpens'] = isset($data['uniqueOpens']) ? $data['uniqueOpens'] : null; - $this->container['spamReports'] = isset($data['spamReports']) ? $data['spamReports'] : null; + $this->container['unique_opens'] = isset($data['unique_opens']) ? $data['unique_opens'] : null; + $this->container['spam_reports'] = isset($data['spam_reports']) ? $data['spam_reports'] : null; $this->container['blocked'] = isset($data['blocked']) ? $data['blocked'] : null; $this->container['invalid'] = isset($data['invalid']) ? $data['invalid'] : null; $this->container['unsubscribed'] = isset($data['unsubscribed']) ? $data['unsubscribed'] : null; @@ -261,6 +261,45 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['range'] === null) { + $invalidProperties[] = "'range' can't be null"; + } + if ($this->container['requests'] === null) { + $invalidProperties[] = "'requests' can't be null"; + } + if ($this->container['delivered'] === null) { + $invalidProperties[] = "'delivered' can't be null"; + } + if ($this->container['hard_bounces'] === null) { + $invalidProperties[] = "'hard_bounces' can't be null"; + } + if ($this->container['soft_bounces'] === null) { + $invalidProperties[] = "'soft_bounces' can't be null"; + } + if ($this->container['clicks'] === null) { + $invalidProperties[] = "'clicks' can't be null"; + } + if ($this->container['unique_clicks'] === null) { + $invalidProperties[] = "'unique_clicks' can't be null"; + } + if ($this->container['opens'] === null) { + $invalidProperties[] = "'opens' can't be null"; + } + if ($this->container['unique_opens'] === null) { + $invalidProperties[] = "'unique_opens' can't be null"; + } + if ($this->container['spam_reports'] === null) { + $invalidProperties[] = "'spam_reports' can't be null"; + } + if ($this->container['blocked'] === null) { + $invalidProperties[] = "'blocked' can't be null"; + } + if ($this->container['invalid'] === null) { + $invalidProperties[] = "'invalid' can't be null"; + } + if ($this->container['unsubscribed'] === null) { + $invalidProperties[] = "'unsubscribed' can't be null"; + } return $invalidProperties; } @@ -349,49 +388,49 @@ public function setDelivered($delivered) } /** - * Gets hardBounces + * Gets hard_bounces * * @return int */ public function getHardBounces() { - return $this->container['hardBounces']; + return $this->container['hard_bounces']; } /** - * Sets hardBounces + * Sets hard_bounces * - * @param int $hardBounces Number of hardbounces for the timeframe + * @param int $hard_bounces Number of hardbounces for the timeframe * * @return $this */ - public function setHardBounces($hardBounces) + public function setHardBounces($hard_bounces) { - $this->container['hardBounces'] = $hardBounces; + $this->container['hard_bounces'] = $hard_bounces; return $this; } /** - * Gets softBounces + * Gets soft_bounces * * @return int */ public function getSoftBounces() { - return $this->container['softBounces']; + return $this->container['soft_bounces']; } /** - * Sets softBounces + * Sets soft_bounces * - * @param int $softBounces Number of softbounces for the timeframe + * @param int $soft_bounces Number of softbounces for the timeframe * * @return $this */ - public function setSoftBounces($softBounces) + public function setSoftBounces($soft_bounces) { - $this->container['softBounces'] = $softBounces; + $this->container['soft_bounces'] = $soft_bounces; return $this; } @@ -421,25 +460,25 @@ public function setClicks($clicks) } /** - * Gets uniqueClicks + * Gets unique_clicks * * @return int */ public function getUniqueClicks() { - return $this->container['uniqueClicks']; + return $this->container['unique_clicks']; } /** - * Sets uniqueClicks + * Sets unique_clicks * - * @param int $uniqueClicks Number of unique clicks for the timeframe + * @param int $unique_clicks Number of unique clicks for the timeframe * * @return $this */ - public function setUniqueClicks($uniqueClicks) + public function setUniqueClicks($unique_clicks) { - $this->container['uniqueClicks'] = $uniqueClicks; + $this->container['unique_clicks'] = $unique_clicks; return $this; } @@ -469,49 +508,49 @@ public function setOpens($opens) } /** - * Gets uniqueOpens + * Gets unique_opens * * @return int */ public function getUniqueOpens() { - return $this->container['uniqueOpens']; + return $this->container['unique_opens']; } /** - * Sets uniqueOpens + * Sets unique_opens * - * @param int $uniqueOpens Number of unique openings for the timeframe + * @param int $unique_opens Number of unique openings for the timeframe * * @return $this */ - public function setUniqueOpens($uniqueOpens) + public function setUniqueOpens($unique_opens) { - $this->container['uniqueOpens'] = $uniqueOpens; + $this->container['unique_opens'] = $unique_opens; return $this; } /** - * Gets spamReports + * Gets spam_reports * * @return int */ public function getSpamReports() { - return $this->container['spamReports']; + return $this->container['spam_reports']; } /** - * Sets spamReports + * Sets spam_reports * - * @param int $spamReports Number of complaint (spam report) for the timeframe + * @param int $spam_reports Number of complaint (spam report) for the timeframe * * @return $this */ - public function setSpamReports($spamReports) + public function setSpamReports($spam_reports) { - $this->container['spamReports'] = $spamReports; + $this->container['spam_reports'] = $spam_reports; return $this; } @@ -594,6 +633,7 @@ public function setUnsubscribed($unsubscribed) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -606,6 +646,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -619,6 +660,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -635,6 +677,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetAttributes.php b/lib/Model/GetAttributes.php index 084a8ea6..dd92c2d1 100644 --- a/lib/Model/GetAttributes.php +++ b/lib/Model/GetAttributes.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -237,6 +237,7 @@ public function setAttributes($attributes) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -249,6 +250,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -262,6 +264,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -278,6 +281,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetAttributesAttributes.php b/lib/Model/GetAttributesAttributes.php index f30ad42d..2315be1c 100644 --- a/lib/Model/GetAttributesAttributes.php +++ b/lib/Model/GetAttributesAttributes.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -61,7 +61,7 @@ class GetAttributesAttributes implements ModelInterface, ArrayAccess 'category' => 'string', 'type' => 'string', 'enumeration' => '\SendinBlue\Client\Model\GetAttributesEnumeration[]', - 'calculatedValue' => 'string' + 'calculated_value' => 'string' ]; /** @@ -74,7 +74,7 @@ class GetAttributesAttributes implements ModelInterface, ArrayAccess 'category' => null, 'type' => null, 'enumeration' => null, - 'calculatedValue' => null + 'calculated_value' => null ]; /** @@ -108,7 +108,7 @@ public static function swaggerFormats() 'category' => 'category', 'type' => 'type', 'enumeration' => 'enumeration', - 'calculatedValue' => 'calculatedValue' + 'calculated_value' => 'calculatedValue' ]; /** @@ -121,7 +121,7 @@ public static function swaggerFormats() 'category' => 'setCategory', 'type' => 'setType', 'enumeration' => 'setEnumeration', - 'calculatedValue' => 'setCalculatedValue' + 'calculated_value' => 'setCalculatedValue' ]; /** @@ -134,7 +134,7 @@ public static function swaggerFormats() 'category' => 'getCategory', 'type' => 'getType', 'enumeration' => 'getEnumeration', - 'calculatedValue' => 'getCalculatedValue' + 'calculated_value' => 'getCalculatedValue' ]; /** @@ -243,7 +243,7 @@ public function __construct(array $data = null) $this->container['category'] = isset($data['category']) ? $data['category'] : null; $this->container['type'] = isset($data['type']) ? $data['type'] : null; $this->container['enumeration'] = isset($data['enumeration']) ? $data['enumeration'] : null; - $this->container['calculatedValue'] = isset($data['calculatedValue']) ? $data['calculatedValue'] : null; + $this->container['calculated_value'] = isset($data['calculated_value']) ? $data['calculated_value'] : null; } /** @@ -407,25 +407,25 @@ public function setEnumeration($enumeration) } /** - * Gets calculatedValue + * Gets calculated_value * * @return string */ public function getCalculatedValue() { - return $this->container['calculatedValue']; + return $this->container['calculated_value']; } /** - * Sets calculatedValue + * Sets calculated_value * - * @param string $calculatedValue Calculated value formula + * @param string $calculated_value Calculated value formula * * @return $this */ - public function setCalculatedValue($calculatedValue) + public function setCalculatedValue($calculated_value) { - $this->container['calculatedValue'] = $calculatedValue; + $this->container['calculated_value'] = $calculated_value; return $this; } @@ -436,6 +436,7 @@ public function setCalculatedValue($calculatedValue) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -448,6 +449,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -461,6 +463,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -477,6 +480,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetAttributesEnumeration.php b/lib/Model/GetAttributesEnumeration.php index 18296d15..f24bc260 100644 --- a/lib/Model/GetAttributesEnumeration.php +++ b/lib/Model/GetAttributesEnumeration.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -270,6 +270,7 @@ public function setLabel($label) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -282,6 +283,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -295,6 +297,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -311,6 +314,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetBlockedDomains.php b/lib/Model/GetBlockedDomains.php index 557661f2..52757882 100644 --- a/lib/Model/GetBlockedDomains.php +++ b/lib/Model/GetBlockedDomains.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -238,6 +238,7 @@ public function setDomains($domains) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -250,6 +251,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -263,6 +265,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -279,6 +282,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetCampaignOverview.php b/lib/Model/GetCampaignOverview.php index e6d7aa39..c83d279d 100644 --- a/lib/Model/GetCampaignOverview.php +++ b/lib/Model/GetCampaignOverview.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -62,14 +62,14 @@ class GetCampaignOverview implements ModelInterface, ArrayAccess 'subject' => 'string', 'type' => 'string', 'status' => 'string', - 'scheduledAt' => 'string', - 'abTesting' => 'bool', - 'subjectA' => 'string', - 'subjectB' => 'string', - 'splitRule' => 'int', - 'winnerCriteria' => 'string', - 'winnerDelay' => 'int', - 'sendAtBestTime' => 'bool' + 'scheduled_at' => '\DateTime', + 'ab_testing' => 'bool', + 'subject_a' => 'string', + 'subject_b' => 'string', + 'split_rule' => 'int', + 'winner_criteria' => 'string', + 'winner_delay' => 'int', + 'send_at_best_time' => 'bool' ]; /** @@ -83,14 +83,14 @@ class GetCampaignOverview implements ModelInterface, ArrayAccess 'subject' => null, 'type' => null, 'status' => null, - 'scheduledAt' => null, - 'abTesting' => null, - 'subjectA' => null, - 'subjectB' => null, - 'splitRule' => null, - 'winnerCriteria' => null, - 'winnerDelay' => null, - 'sendAtBestTime' => null + 'scheduled_at' => 'date-time', + 'ab_testing' => null, + 'subject_a' => null, + 'subject_b' => null, + 'split_rule' => null, + 'winner_criteria' => null, + 'winner_delay' => null, + 'send_at_best_time' => null ]; /** @@ -125,14 +125,14 @@ public static function swaggerFormats() 'subject' => 'subject', 'type' => 'type', 'status' => 'status', - 'scheduledAt' => 'scheduledAt', - 'abTesting' => 'abTesting', - 'subjectA' => 'subjectA', - 'subjectB' => 'subjectB', - 'splitRule' => 'splitRule', - 'winnerCriteria' => 'winnerCriteria', - 'winnerDelay' => 'winnerDelay', - 'sendAtBestTime' => 'sendAtBestTime' + 'scheduled_at' => 'scheduledAt', + 'ab_testing' => 'abTesting', + 'subject_a' => 'subjectA', + 'subject_b' => 'subjectB', + 'split_rule' => 'splitRule', + 'winner_criteria' => 'winnerCriteria', + 'winner_delay' => 'winnerDelay', + 'send_at_best_time' => 'sendAtBestTime' ]; /** @@ -146,14 +146,14 @@ public static function swaggerFormats() 'subject' => 'setSubject', 'type' => 'setType', 'status' => 'setStatus', - 'scheduledAt' => 'setScheduledAt', - 'abTesting' => 'setAbTesting', - 'subjectA' => 'setSubjectA', - 'subjectB' => 'setSubjectB', - 'splitRule' => 'setSplitRule', - 'winnerCriteria' => 'setWinnerCriteria', - 'winnerDelay' => 'setWinnerDelay', - 'sendAtBestTime' => 'setSendAtBestTime' + 'scheduled_at' => 'setScheduledAt', + 'ab_testing' => 'setAbTesting', + 'subject_a' => 'setSubjectA', + 'subject_b' => 'setSubjectB', + 'split_rule' => 'setSplitRule', + 'winner_criteria' => 'setWinnerCriteria', + 'winner_delay' => 'setWinnerDelay', + 'send_at_best_time' => 'setSendAtBestTime' ]; /** @@ -167,14 +167,14 @@ public static function swaggerFormats() 'subject' => 'getSubject', 'type' => 'getType', 'status' => 'getStatus', - 'scheduledAt' => 'getScheduledAt', - 'abTesting' => 'getAbTesting', - 'subjectA' => 'getSubjectA', - 'subjectB' => 'getSubjectB', - 'splitRule' => 'getSplitRule', - 'winnerCriteria' => 'getWinnerCriteria', - 'winnerDelay' => 'getWinnerDelay', - 'sendAtBestTime' => 'getSendAtBestTime' + 'scheduled_at' => 'getScheduledAt', + 'ab_testing' => 'getAbTesting', + 'subject_a' => 'getSubjectA', + 'subject_b' => 'getSubjectB', + 'split_rule' => 'getSplitRule', + 'winner_criteria' => 'getWinnerCriteria', + 'winner_delay' => 'getWinnerDelay', + 'send_at_best_time' => 'getSendAtBestTime' ]; /** @@ -280,14 +280,14 @@ public function __construct(array $data = null) $this->container['subject'] = isset($data['subject']) ? $data['subject'] : null; $this->container['type'] = isset($data['type']) ? $data['type'] : null; $this->container['status'] = isset($data['status']) ? $data['status'] : null; - $this->container['scheduledAt'] = isset($data['scheduledAt']) ? $data['scheduledAt'] : null; - $this->container['abTesting'] = isset($data['abTesting']) ? $data['abTesting'] : null; - $this->container['subjectA'] = isset($data['subjectA']) ? $data['subjectA'] : null; - $this->container['subjectB'] = isset($data['subjectB']) ? $data['subjectB'] : null; - $this->container['splitRule'] = isset($data['splitRule']) ? $data['splitRule'] : null; - $this->container['winnerCriteria'] = isset($data['winnerCriteria']) ? $data['winnerCriteria'] : null; - $this->container['winnerDelay'] = isset($data['winnerDelay']) ? $data['winnerDelay'] : null; - $this->container['sendAtBestTime'] = isset($data['sendAtBestTime']) ? $data['sendAtBestTime'] : null; + $this->container['scheduled_at'] = isset($data['scheduled_at']) ? $data['scheduled_at'] : null; + $this->container['ab_testing'] = isset($data['ab_testing']) ? $data['ab_testing'] : null; + $this->container['subject_a'] = isset($data['subject_a']) ? $data['subject_a'] : null; + $this->container['subject_b'] = isset($data['subject_b']) ? $data['subject_b'] : null; + $this->container['split_rule'] = isset($data['split_rule']) ? $data['split_rule'] : null; + $this->container['winner_criteria'] = isset($data['winner_criteria']) ? $data['winner_criteria'] : null; + $this->container['winner_delay'] = isset($data['winner_delay']) ? $data['winner_delay'] : null; + $this->container['send_at_best_time'] = isset($data['send_at_best_time']) ? $data['send_at_best_time'] : null; } /** @@ -481,193 +481,193 @@ public function setStatus($status) } /** - * Gets scheduledAt + * Gets scheduled_at * - * @return string + * @return \DateTime */ public function getScheduledAt() { - return $this->container['scheduledAt']; + return $this->container['scheduled_at']; } /** - * Sets scheduledAt + * Sets scheduled_at * - * @param string $scheduledAt UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @param \DateTime $scheduled_at UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ) * * @return $this */ - public function setScheduledAt($scheduledAt) + public function setScheduledAt($scheduled_at) { - $this->container['scheduledAt'] = $scheduledAt; + $this->container['scheduled_at'] = $scheduled_at; return $this; } /** - * Gets abTesting + * Gets ab_testing * * @return bool */ public function getAbTesting() { - return $this->container['abTesting']; + return $this->container['ab_testing']; } /** - * Sets abTesting + * Sets ab_testing * - * @param bool $abTesting Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled. + * @param bool $ab_testing Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled. * * @return $this */ - public function setAbTesting($abTesting) + public function setAbTesting($ab_testing) { - $this->container['abTesting'] = $abTesting; + $this->container['ab_testing'] = $ab_testing; return $this; } /** - * Gets subjectA + * Gets subject_a * * @return string */ public function getSubjectA() { - return $this->container['subjectA']; + return $this->container['subject_a']; } /** - * Sets subjectA + * Sets subject_a * - * @param string $subjectA Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` + * @param string $subject_a Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` * * @return $this */ - public function setSubjectA($subjectA) + public function setSubjectA($subject_a) { - $this->container['subjectA'] = $subjectA; + $this->container['subject_a'] = $subject_a; return $this; } /** - * Gets subjectB + * Gets subject_b * * @return string */ public function getSubjectB() { - return $this->container['subjectB']; + return $this->container['subject_b']; } /** - * Sets subjectB + * Sets subject_b * - * @param string $subjectB Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` + * @param string $subject_b Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` * * @return $this */ - public function setSubjectB($subjectB) + public function setSubjectB($subject_b) { - $this->container['subjectB'] = $subjectB; + $this->container['subject_b'] = $subject_b; return $this; } /** - * Gets splitRule + * Gets split_rule * * @return int */ public function getSplitRule() { - return $this->container['splitRule']; + return $this->container['split_rule']; } /** - * Sets splitRule + * Sets split_rule * - * @param int $splitRule The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true` + * @param int $split_rule The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true` * * @return $this */ - public function setSplitRule($splitRule) + public function setSplitRule($split_rule) { - $this->container['splitRule'] = $splitRule; + $this->container['split_rule'] = $split_rule; return $this; } /** - * Gets winnerCriteria + * Gets winner_criteria * * @return string */ public function getWinnerCriteria() { - return $this->container['winnerCriteria']; + return $this->container['winner_criteria']; } /** - * Sets winnerCriteria + * Sets winner_criteria * - * @param string $winnerCriteria Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true` + * @param string $winner_criteria Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true` * * @return $this */ - public function setWinnerCriteria($winnerCriteria) + public function setWinnerCriteria($winner_criteria) { - $this->container['winnerCriteria'] = $winnerCriteria; + $this->container['winner_criteria'] = $winner_criteria; return $this; } /** - * Gets winnerDelay + * Gets winner_delay * * @return int */ public function getWinnerDelay() { - return $this->container['winnerDelay']; + return $this->container['winner_delay']; } /** - * Sets winnerDelay + * Sets winner_delay * - * @param int $winnerDelay The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true` + * @param int $winner_delay The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true` * * @return $this */ - public function setWinnerDelay($winnerDelay) + public function setWinnerDelay($winner_delay) { - $this->container['winnerDelay'] = $winnerDelay; + $this->container['winner_delay'] = $winner_delay; return $this; } /** - * Gets sendAtBestTime + * Gets send_at_best_time * * @return bool */ public function getSendAtBestTime() { - return $this->container['sendAtBestTime']; + return $this->container['send_at_best_time']; } /** - * Sets sendAtBestTime + * Sets send_at_best_time * - * @param bool $sendAtBestTime It is true if you have chosen to send your campaign at best time, otherwise it is false + * @param bool $send_at_best_time It is true if you have chosen to send your campaign at best time, otherwise it is false * * @return $this */ - public function setSendAtBestTime($sendAtBestTime) + public function setSendAtBestTime($send_at_best_time) { - $this->container['sendAtBestTime'] = $sendAtBestTime; + $this->container['send_at_best_time'] = $send_at_best_time; return $this; } @@ -678,6 +678,7 @@ public function setSendAtBestTime($sendAtBestTime) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -690,6 +691,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -703,6 +705,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -719,6 +722,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetCampaignRecipients.php b/lib/Model/GetCampaignRecipients.php index 64219c35..e5757d48 100644 --- a/lib/Model/GetCampaignRecipients.php +++ b/lib/Model/GetCampaignRecipients.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -58,7 +58,7 @@ class GetCampaignRecipients implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'lists' => 'int[]', - 'exclusionLists' => 'int[]' + 'exclusion_lists' => 'int[]' ]; /** @@ -68,7 +68,7 @@ class GetCampaignRecipients implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'lists' => 'int64', - 'exclusionLists' => 'int64' + 'exclusion_lists' => 'int64' ]; /** @@ -99,7 +99,7 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'lists' => 'lists', - 'exclusionLists' => 'exclusionLists' + 'exclusion_lists' => 'exclusionLists' ]; /** @@ -109,7 +109,7 @@ public static function swaggerFormats() */ protected static $setters = [ 'lists' => 'setLists', - 'exclusionLists' => 'setExclusionLists' + 'exclusion_lists' => 'setExclusionLists' ]; /** @@ -119,7 +119,7 @@ public static function swaggerFormats() */ protected static $getters = [ 'lists' => 'getLists', - 'exclusionLists' => 'getExclusionLists' + 'exclusion_lists' => 'getExclusionLists' ]; /** @@ -183,7 +183,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['lists'] = isset($data['lists']) ? $data['lists'] : null; - $this->container['exclusionLists'] = isset($data['exclusionLists']) ? $data['exclusionLists'] : null; + $this->container['exclusion_lists'] = isset($data['exclusion_lists']) ? $data['exclusion_lists'] : null; } /** @@ -198,8 +198,8 @@ public function listInvalidProperties() if ($this->container['lists'] === null) { $invalidProperties[] = "'lists' can't be null"; } - if ($this->container['exclusionLists'] === null) { - $invalidProperties[] = "'exclusionLists' can't be null"; + if ($this->container['exclusion_lists'] === null) { + $invalidProperties[] = "'exclusion_lists' can't be null"; } return $invalidProperties; } @@ -241,25 +241,25 @@ public function setLists($lists) } /** - * Gets exclusionLists + * Gets exclusion_lists * * @return int[] */ public function getExclusionLists() { - return $this->container['exclusionLists']; + return $this->container['exclusion_lists']; } /** - * Sets exclusionLists + * Sets exclusion_lists * - * @param int[] $exclusionLists exclusionLists + * @param int[] $exclusion_lists exclusion_lists * * @return $this */ - public function setExclusionLists($exclusionLists) + public function setExclusionLists($exclusion_lists) { - $this->container['exclusionLists'] = $exclusionLists; + $this->container['exclusion_lists'] = $exclusion_lists; return $this; } @@ -270,6 +270,7 @@ public function setExclusionLists($exclusionLists) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -282,6 +283,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -295,6 +297,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -311,6 +314,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetCampaignStats.php b/lib/Model/GetCampaignStats.php index 271ddb5f..6e412119 100644 --- a/lib/Model/GetCampaignStats.php +++ b/lib/Model/GetCampaignStats.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -57,22 +57,20 @@ class GetCampaignStats implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'listId' => 'int', - 'uniqueClicks' => 'int', + 'list_id' => 'int', + 'unique_clicks' => 'int', 'clickers' => 'int', 'complaints' => 'int', 'delivered' => 'int', 'sent' => 'int', - 'softBounces' => 'int', - 'hardBounces' => 'int', - 'uniqueViews' => 'int', - 'trackableViews' => 'int', - 'trackableViewsRate' => 'float', - 'estimatedViews' => 'int', + 'soft_bounces' => 'int', + 'hard_bounces' => 'int', + 'unique_views' => 'int', + 'trackable_views' => 'int', 'unsubscriptions' => 'int', 'viewed' => 'int', 'deferred' => 'int', - 'returnBounce' => 'int' + 'return_bounce' => 'int' ]; /** @@ -81,22 +79,20 @@ class GetCampaignStats implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'listId' => 'int64', - 'uniqueClicks' => 'int64', + 'list_id' => 'int64', + 'unique_clicks' => 'int64', 'clickers' => 'int64', 'complaints' => 'int64', 'delivered' => 'int64', 'sent' => 'int64', - 'softBounces' => 'int64', - 'hardBounces' => 'int64', - 'uniqueViews' => 'int64', - 'trackableViews' => 'int64', - 'trackableViewsRate' => 'float', - 'estimatedViews' => 'int64', + 'soft_bounces' => 'int64', + 'hard_bounces' => 'int64', + 'unique_views' => 'int64', + 'trackable_views' => 'int64', 'unsubscriptions' => 'int64', 'viewed' => 'int64', 'deferred' => 'int64', - 'returnBounce' => 'int64' + 'return_bounce' => 'int64' ]; /** @@ -126,22 +122,20 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'listId' => 'listId', - 'uniqueClicks' => 'uniqueClicks', + 'list_id' => 'listId', + 'unique_clicks' => 'uniqueClicks', 'clickers' => 'clickers', 'complaints' => 'complaints', 'delivered' => 'delivered', 'sent' => 'sent', - 'softBounces' => 'softBounces', - 'hardBounces' => 'hardBounces', - 'uniqueViews' => 'uniqueViews', - 'trackableViews' => 'trackableViews', - 'trackableViewsRate' => 'trackableViewsRate', - 'estimatedViews' => 'estimatedViews', + 'soft_bounces' => 'softBounces', + 'hard_bounces' => 'hardBounces', + 'unique_views' => 'uniqueViews', + 'trackable_views' => 'trackableViews', 'unsubscriptions' => 'unsubscriptions', 'viewed' => 'viewed', 'deferred' => 'deferred', - 'returnBounce' => 'returnBounce' + 'return_bounce' => 'returnBounce' ]; /** @@ -150,22 +144,20 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'listId' => 'setListId', - 'uniqueClicks' => 'setUniqueClicks', + 'list_id' => 'setListId', + 'unique_clicks' => 'setUniqueClicks', 'clickers' => 'setClickers', 'complaints' => 'setComplaints', 'delivered' => 'setDelivered', 'sent' => 'setSent', - 'softBounces' => 'setSoftBounces', - 'hardBounces' => 'setHardBounces', - 'uniqueViews' => 'setUniqueViews', - 'trackableViews' => 'setTrackableViews', - 'trackableViewsRate' => 'setTrackableViewsRate', - 'estimatedViews' => 'setEstimatedViews', + 'soft_bounces' => 'setSoftBounces', + 'hard_bounces' => 'setHardBounces', + 'unique_views' => 'setUniqueViews', + 'trackable_views' => 'setTrackableViews', 'unsubscriptions' => 'setUnsubscriptions', 'viewed' => 'setViewed', 'deferred' => 'setDeferred', - 'returnBounce' => 'setReturnBounce' + 'return_bounce' => 'setReturnBounce' ]; /** @@ -174,22 +166,20 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'listId' => 'getListId', - 'uniqueClicks' => 'getUniqueClicks', + 'list_id' => 'getListId', + 'unique_clicks' => 'getUniqueClicks', 'clickers' => 'getClickers', 'complaints' => 'getComplaints', 'delivered' => 'getDelivered', 'sent' => 'getSent', - 'softBounces' => 'getSoftBounces', - 'hardBounces' => 'getHardBounces', - 'uniqueViews' => 'getUniqueViews', - 'trackableViews' => 'getTrackableViews', - 'trackableViewsRate' => 'getTrackableViewsRate', - 'estimatedViews' => 'getEstimatedViews', + 'soft_bounces' => 'getSoftBounces', + 'hard_bounces' => 'getHardBounces', + 'unique_views' => 'getUniqueViews', + 'trackable_views' => 'getTrackableViews', 'unsubscriptions' => 'getUnsubscriptions', 'viewed' => 'getViewed', 'deferred' => 'getDeferred', - 'returnBounce' => 'getReturnBounce' + 'return_bounce' => 'getReturnBounce' ]; /** @@ -252,22 +242,20 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['listId'] = isset($data['listId']) ? $data['listId'] : null; - $this->container['uniqueClicks'] = isset($data['uniqueClicks']) ? $data['uniqueClicks'] : null; + $this->container['list_id'] = isset($data['list_id']) ? $data['list_id'] : null; + $this->container['unique_clicks'] = isset($data['unique_clicks']) ? $data['unique_clicks'] : null; $this->container['clickers'] = isset($data['clickers']) ? $data['clickers'] : null; $this->container['complaints'] = isset($data['complaints']) ? $data['complaints'] : null; $this->container['delivered'] = isset($data['delivered']) ? $data['delivered'] : null; $this->container['sent'] = isset($data['sent']) ? $data['sent'] : null; - $this->container['softBounces'] = isset($data['softBounces']) ? $data['softBounces'] : null; - $this->container['hardBounces'] = isset($data['hardBounces']) ? $data['hardBounces'] : null; - $this->container['uniqueViews'] = isset($data['uniqueViews']) ? $data['uniqueViews'] : null; - $this->container['trackableViews'] = isset($data['trackableViews']) ? $data['trackableViews'] : null; - $this->container['trackableViewsRate'] = isset($data['trackableViewsRate']) ? $data['trackableViewsRate'] : null; - $this->container['estimatedViews'] = isset($data['estimatedViews']) ? $data['estimatedViews'] : null; + $this->container['soft_bounces'] = isset($data['soft_bounces']) ? $data['soft_bounces'] : null; + $this->container['hard_bounces'] = isset($data['hard_bounces']) ? $data['hard_bounces'] : null; + $this->container['unique_views'] = isset($data['unique_views']) ? $data['unique_views'] : null; + $this->container['trackable_views'] = isset($data['trackable_views']) ? $data['trackable_views'] : null; $this->container['unsubscriptions'] = isset($data['unsubscriptions']) ? $data['unsubscriptions'] : null; $this->container['viewed'] = isset($data['viewed']) ? $data['viewed'] : null; $this->container['deferred'] = isset($data['deferred']) ? $data['deferred'] : null; - $this->container['returnBounce'] = isset($data['returnBounce']) ? $data['returnBounce'] : null; + $this->container['return_bounce'] = isset($data['return_bounce']) ? $data['return_bounce'] : null; } /** @@ -279,8 +267,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['uniqueClicks'] === null) { - $invalidProperties[] = "'uniqueClicks' can't be null"; + if ($this->container['unique_clicks'] === null) { + $invalidProperties[] = "'unique_clicks' can't be null"; } if ($this->container['clickers'] === null) { $invalidProperties[] = "'clickers' can't be null"; @@ -294,17 +282,17 @@ public function listInvalidProperties() if ($this->container['sent'] === null) { $invalidProperties[] = "'sent' can't be null"; } - if ($this->container['softBounces'] === null) { - $invalidProperties[] = "'softBounces' can't be null"; + if ($this->container['soft_bounces'] === null) { + $invalidProperties[] = "'soft_bounces' can't be null"; } - if ($this->container['hardBounces'] === null) { - $invalidProperties[] = "'hardBounces' can't be null"; + if ($this->container['hard_bounces'] === null) { + $invalidProperties[] = "'hard_bounces' can't be null"; } - if ($this->container['uniqueViews'] === null) { - $invalidProperties[] = "'uniqueViews' can't be null"; + if ($this->container['unique_views'] === null) { + $invalidProperties[] = "'unique_views' can't be null"; } - if ($this->container['trackableViews'] === null) { - $invalidProperties[] = "'trackableViews' can't be null"; + if ($this->container['trackable_views'] === null) { + $invalidProperties[] = "'trackable_views' can't be null"; } if ($this->container['unsubscriptions'] === null) { $invalidProperties[] = "'unsubscriptions' can't be null"; @@ -328,49 +316,49 @@ public function valid() /** - * Gets listId + * Gets list_id * * @return int */ public function getListId() { - return $this->container['listId']; + return $this->container['list_id']; } /** - * Sets listId + * Sets list_id * - * @param int $listId List Id of email campaign (only in case of get email campaign(s)(not for global stats)) + * @param int $list_id List Id of email campaign (only in case of get email campaign(s)(not for global stats)) * * @return $this */ - public function setListId($listId) + public function setListId($list_id) { - $this->container['listId'] = $listId; + $this->container['list_id'] = $list_id; return $this; } /** - * Gets uniqueClicks + * Gets unique_clicks * * @return int */ public function getUniqueClicks() { - return $this->container['uniqueClicks']; + return $this->container['unique_clicks']; } /** - * Sets uniqueClicks + * Sets unique_clicks * - * @param int $uniqueClicks Number of unique clicks for the campaign + * @param int $unique_clicks Number of unique clicks for the campaign * * @return $this */ - public function setUniqueClicks($uniqueClicks) + public function setUniqueClicks($unique_clicks) { - $this->container['uniqueClicks'] = $uniqueClicks; + $this->container['unique_clicks'] = $unique_clicks; return $this; } @@ -472,145 +460,97 @@ public function setSent($sent) } /** - * Gets softBounces + * Gets soft_bounces * * @return int */ public function getSoftBounces() { - return $this->container['softBounces']; + return $this->container['soft_bounces']; } /** - * Sets softBounces + * Sets soft_bounces * - * @param int $softBounces Number of softbounce for the campaign + * @param int $soft_bounces Number of softbounce for the campaign * * @return $this */ - public function setSoftBounces($softBounces) + public function setSoftBounces($soft_bounces) { - $this->container['softBounces'] = $softBounces; + $this->container['soft_bounces'] = $soft_bounces; return $this; } /** - * Gets hardBounces + * Gets hard_bounces * * @return int */ public function getHardBounces() { - return $this->container['hardBounces']; + return $this->container['hard_bounces']; } /** - * Sets hardBounces + * Sets hard_bounces * - * @param int $hardBounces Number of harbounce for the campaign + * @param int $hard_bounces Number of harbounce for the campaign * * @return $this */ - public function setHardBounces($hardBounces) + public function setHardBounces($hard_bounces) { - $this->container['hardBounces'] = $hardBounces; + $this->container['hard_bounces'] = $hard_bounces; return $this; } /** - * Gets uniqueViews + * Gets unique_views * * @return int */ public function getUniqueViews() { - return $this->container['uniqueViews']; + return $this->container['unique_views']; } /** - * Sets uniqueViews + * Sets unique_views * - * @param int $uniqueViews Number of unique openings for the campaign + * @param int $unique_views Number of unique openings for the campaign * * @return $this */ - public function setUniqueViews($uniqueViews) + public function setUniqueViews($unique_views) { - $this->container['uniqueViews'] = $uniqueViews; + $this->container['unique_views'] = $unique_views; return $this; } /** - * Gets trackableViews + * Gets trackable_views * * @return int */ public function getTrackableViews() { - return $this->container['trackableViews']; + return $this->container['trackable_views']; } /** - * Sets trackableViews + * Sets trackable_views * - * @param int $trackableViews Recipients without any privacy protection option enabled in their email client + * @param int $trackable_views Recipients without any privacy protection option enabled in their email client * * @return $this */ - public function setTrackableViews($trackableViews) + public function setTrackableViews($trackable_views) { - $this->container['trackableViews'] = $trackableViews; - - return $this; - } - - /** - * Gets trackableViewsRate - * - * @return float - */ - public function getTrackableViewsRate() - { - return $this->container['trackableViewsRate']; - } - - /** - * Sets trackableViewsRate - * - * @param float $trackableViewsRate Rate of recipients without any privacy protection option enabled in their email client - * - * @return $this - */ - public function setTrackableViewsRate($trackableViewsRate) - { - $this->container['trackableViewsRate'] = $trackableViewsRate; - - return $this; - } - - /** - * Gets estimatedViews - * - * @return int - */ - public function getEstimatedViews() - { - return $this->container['estimatedViews']; - } - - /** - * Sets estimatedViews - * - * @param int $estimatedViews Rate of recipients without any privacy protection option enabled in their email client, applied to all delivered emails - * - * @return $this - */ - public function setEstimatedViews($estimatedViews) - { - $this->container['estimatedViews'] = $estimatedViews; + $this->container['trackable_views'] = $trackable_views; return $this; } @@ -688,25 +628,25 @@ public function setDeferred($deferred) } /** - * Gets returnBounce + * Gets return_bounce * * @return int */ public function getReturnBounce() { - return $this->container['returnBounce']; + return $this->container['return_bounce']; } /** - * Sets returnBounce + * Sets return_bounce * - * @param int $returnBounce Total number of non-delivered campaigns for a particular campaign id. + * @param int $return_bounce Total number of non-delivered campaigns for a particular campaign id. * * @return $this */ - public function setReturnBounce($returnBounce) + public function setReturnBounce($return_bounce) { - $this->container['returnBounce'] = $returnBounce; + $this->container['return_bounce'] = $return_bounce; return $this; } @@ -717,6 +657,7 @@ public function setReturnBounce($returnBounce) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -729,6 +670,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -742,6 +684,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -758,6 +701,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetChildAccountCreationStatus.php b/lib/Model/GetChildAccountCreationStatus.php index 0c55c161..6bfe12d2 100644 --- a/lib/Model/GetChildAccountCreationStatus.php +++ b/lib/Model/GetChildAccountCreationStatus.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -57,7 +57,7 @@ class GetChildAccountCreationStatus implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'childAccountCreated' => 'bool' + 'child_account_created' => 'bool' ]; /** @@ -66,7 +66,7 @@ class GetChildAccountCreationStatus implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'childAccountCreated' => null + 'child_account_created' => null ]; /** @@ -96,7 +96,7 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'childAccountCreated' => 'childAccountCreated' + 'child_account_created' => 'childAccountCreated' ]; /** @@ -105,7 +105,7 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'childAccountCreated' => 'setChildAccountCreated' + 'child_account_created' => 'setChildAccountCreated' ]; /** @@ -114,7 +114,7 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'childAccountCreated' => 'getChildAccountCreated' + 'child_account_created' => 'getChildAccountCreated' ]; /** @@ -177,7 +177,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['childAccountCreated'] = isset($data['childAccountCreated']) ? $data['childAccountCreated'] : null; + $this->container['child_account_created'] = isset($data['child_account_created']) ? $data['child_account_created'] : null; } /** @@ -189,8 +189,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['childAccountCreated'] === null) { - $invalidProperties[] = "'childAccountCreated' can't be null"; + if ($this->container['child_account_created'] === null) { + $invalidProperties[] = "'child_account_created' can't be null"; } return $invalidProperties; } @@ -208,25 +208,25 @@ public function valid() /** - * Gets childAccountCreated + * Gets child_account_created * * @return bool */ public function getChildAccountCreated() { - return $this->container['childAccountCreated']; + return $this->container['child_account_created']; } /** - * Sets childAccountCreated + * Sets child_account_created * - * @param bool $childAccountCreated Status of child account creation whether it is successfully created (exists) or not. + * @param bool $child_account_created Status of child account creation whether it is successfully created (exists) or not. * * @return $this */ - public function setChildAccountCreated($childAccountCreated) + public function setChildAccountCreated($child_account_created) { - $this->container['childAccountCreated'] = $childAccountCreated; + $this->container['child_account_created'] = $child_account_created; return $this; } @@ -237,6 +237,7 @@ public function setChildAccountCreated($childAccountCreated) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -249,6 +250,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -262,6 +264,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -278,6 +281,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetChildDomain.php b/lib/Model/GetChildDomain.php index b75a0273..97313d43 100644 --- a/lib/Model/GetChildDomain.php +++ b/lib/Model/GetChildDomain.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -195,6 +195,12 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['domain'] === null) { + $invalidProperties[] = "'domain' can't be null"; + } + if ($this->container['active'] === null) { + $invalidProperties[] = "'active' can't be null"; + } return $invalidProperties; } @@ -264,6 +270,7 @@ public function setActive($active) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -276,6 +283,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -289,6 +297,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -305,6 +314,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetChildDomains.php b/lib/Model/GetChildDomains.php index 89c0a9ab..7d574ffc 100644 --- a/lib/Model/GetChildDomains.php +++ b/lib/Model/GetChildDomains.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -209,6 +209,7 @@ public function valid() * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -221,6 +222,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -234,6 +236,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -250,6 +253,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetChildInfo.php b/lib/Model/GetChildInfo.php index 324e1687..f2d78576 100644 --- a/lib/Model/GetChildInfo.php +++ b/lib/Model/GetChildInfo.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -59,7 +59,7 @@ class GetChildInfo extends GetClient 'statistics' => '\SendinBlue\Client\Model\GetChildInfoStatistics', 'password' => 'string', 'ips' => 'string[]', - 'apiKeys' => '\SendinBlue\Client\Model\GetChildInfoApiKeys' + 'api_keys' => '\SendinBlue\Client\Model\GetChildInfoApiKeys' ]; /** @@ -72,7 +72,7 @@ class GetChildInfo extends GetClient 'statistics' => null, 'password' => 'password', 'ips' => null, - 'apiKeys' => null + 'api_keys' => null ]; /** @@ -106,7 +106,7 @@ public static function swaggerFormats() 'statistics' => 'statistics', 'password' => 'password', 'ips' => 'ips', - 'apiKeys' => 'apiKeys' + 'api_keys' => 'apiKeys' ]; /** @@ -119,7 +119,7 @@ public static function swaggerFormats() 'statistics' => 'setStatistics', 'password' => 'setPassword', 'ips' => 'setIps', - 'apiKeys' => 'setApiKeys' + 'api_keys' => 'setApiKeys' ]; /** @@ -132,7 +132,7 @@ public static function swaggerFormats() 'statistics' => 'getStatistics', 'password' => 'getPassword', 'ips' => 'getIps', - 'apiKeys' => 'getApiKeys' + 'api_keys' => 'getApiKeys' ]; /** @@ -195,7 +195,7 @@ public function __construct(array $data = null) $this->container['statistics'] = isset($data['statistics']) ? $data['statistics'] : null; $this->container['password'] = isset($data['password']) ? $data['password'] : null; $this->container['ips'] = isset($data['ips']) ? $data['ips'] : null; - $this->container['apiKeys'] = isset($data['apiKeys']) ? $data['apiKeys'] : null; + $this->container['api_keys'] = isset($data['api_keys']) ? $data['api_keys'] : null; } /** @@ -322,25 +322,25 @@ public function setIps($ips) } /** - * Gets apiKeys + * Gets api_keys * * @return \SendinBlue\Client\Model\GetChildInfoApiKeys */ public function getApiKeys() { - return $this->container['apiKeys']; + return $this->container['api_keys']; } /** - * Sets apiKeys + * Sets api_keys * - * @param \SendinBlue\Client\Model\GetChildInfoApiKeys $apiKeys apiKeys + * @param \SendinBlue\Client\Model\GetChildInfoApiKeys $api_keys api_keys * * @return $this */ - public function setApiKeys($apiKeys) + public function setApiKeys($api_keys) { - $this->container['apiKeys'] = $apiKeys; + $this->container['api_keys'] = $api_keys; return $this; } @@ -351,6 +351,7 @@ public function setApiKeys($apiKeys) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -363,6 +364,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -376,6 +378,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -392,6 +395,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetChildInfoApiKeys.php b/lib/Model/GetChildInfoApiKeys.php index 3fd40a18..f10c0529 100644 --- a/lib/Model/GetChildInfoApiKeys.php +++ b/lib/Model/GetChildInfoApiKeys.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -268,6 +268,7 @@ public function setV3($v3) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -280,6 +281,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -293,6 +295,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -309,6 +312,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetChildInfoApiKeysV2.php b/lib/Model/GetChildInfoApiKeysV2.php index dce7074b..2e7617b5 100644 --- a/lib/Model/GetChildInfoApiKeysV2.php +++ b/lib/Model/GetChildInfoApiKeysV2.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -270,6 +270,7 @@ public function setKey($key) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -282,6 +283,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -295,6 +297,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -311,6 +314,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetChildInfoApiKeysV3.php b/lib/Model/GetChildInfoApiKeysV3.php index e5c901b1..0ed7dd9b 100644 --- a/lib/Model/GetChildInfoApiKeysV3.php +++ b/lib/Model/GetChildInfoApiKeysV3.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -270,6 +270,7 @@ public function setKey($key) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -282,6 +283,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -295,6 +297,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -311,6 +314,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetChildInfoCredits.php b/lib/Model/GetChildInfoCredits.php index 71e957d7..ae96c9aa 100644 --- a/lib/Model/GetChildInfoCredits.php +++ b/lib/Model/GetChildInfoCredits.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -58,8 +58,8 @@ class GetChildInfoCredits implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'emailCredits' => 'int', - 'smsCredits' => 'int' + 'email_credits' => 'int', + 'sms_credits' => 'int' ]; /** @@ -68,8 +68,8 @@ class GetChildInfoCredits implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'emailCredits' => 'int64', - 'smsCredits' => 'int64' + 'email_credits' => 'int64', + 'sms_credits' => 'int64' ]; /** @@ -99,8 +99,8 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'emailCredits' => 'emailCredits', - 'smsCredits' => 'smsCredits' + 'email_credits' => 'emailCredits', + 'sms_credits' => 'smsCredits' ]; /** @@ -109,8 +109,8 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'emailCredits' => 'setEmailCredits', - 'smsCredits' => 'setSmsCredits' + 'email_credits' => 'setEmailCredits', + 'sms_credits' => 'setSmsCredits' ]; /** @@ -119,8 +119,8 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'emailCredits' => 'getEmailCredits', - 'smsCredits' => 'getSmsCredits' + 'email_credits' => 'getEmailCredits', + 'sms_credits' => 'getSmsCredits' ]; /** @@ -183,8 +183,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['emailCredits'] = isset($data['emailCredits']) ? $data['emailCredits'] : null; - $this->container['smsCredits'] = isset($data['smsCredits']) ? $data['smsCredits'] : null; + $this->container['email_credits'] = isset($data['email_credits']) ? $data['email_credits'] : null; + $this->container['sms_credits'] = isset($data['sms_credits']) ? $data['sms_credits'] : null; } /** @@ -212,49 +212,49 @@ public function valid() /** - * Gets emailCredits + * Gets email_credits * * @return int */ public function getEmailCredits() { - return $this->container['emailCredits']; + return $this->container['email_credits']; } /** - * Sets emailCredits + * Sets email_credits * - * @param int $emailCredits Email credits available for your child + * @param int $email_credits Email credits available for your child * * @return $this */ - public function setEmailCredits($emailCredits) + public function setEmailCredits($email_credits) { - $this->container['emailCredits'] = $emailCredits; + $this->container['email_credits'] = $email_credits; return $this; } /** - * Gets smsCredits + * Gets sms_credits * * @return int */ public function getSmsCredits() { - return $this->container['smsCredits']; + return $this->container['sms_credits']; } /** - * Sets smsCredits + * Sets sms_credits * - * @param int $smsCredits SMS credits available for your child + * @param int $sms_credits SMS credits available for your child * * @return $this */ - public function setSmsCredits($smsCredits) + public function setSmsCredits($sms_credits) { - $this->container['smsCredits'] = $smsCredits; + $this->container['sms_credits'] = $sms_credits; return $this; } @@ -265,6 +265,7 @@ public function setSmsCredits($smsCredits) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -277,6 +278,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -290,6 +292,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -306,6 +309,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetChildInfoStatistics.php b/lib/Model/GetChildInfoStatistics.php index 1bf4f9f6..7f61826c 100644 --- a/lib/Model/GetChildInfoStatistics.php +++ b/lib/Model/GetChildInfoStatistics.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -58,9 +58,9 @@ class GetChildInfoStatistics implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'previousMonthTotalSent' => 'int', - 'currentMonthTotalSent' => 'int', - 'totalSent' => 'int' + 'previous_month_total_sent' => 'int', + 'current_month_total_sent' => 'int', + 'total_sent' => 'int' ]; /** @@ -69,9 +69,9 @@ class GetChildInfoStatistics implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'previousMonthTotalSent' => 'int64', - 'currentMonthTotalSent' => 'int64', - 'totalSent' => 'int64' + 'previous_month_total_sent' => 'int64', + 'current_month_total_sent' => 'int64', + 'total_sent' => 'int64' ]; /** @@ -101,9 +101,9 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'previousMonthTotalSent' => 'previousMonthTotalSent', - 'currentMonthTotalSent' => 'currentMonthTotalSent', - 'totalSent' => 'totalSent' + 'previous_month_total_sent' => 'previousMonthTotalSent', + 'current_month_total_sent' => 'currentMonthTotalSent', + 'total_sent' => 'totalSent' ]; /** @@ -112,9 +112,9 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'previousMonthTotalSent' => 'setPreviousMonthTotalSent', - 'currentMonthTotalSent' => 'setCurrentMonthTotalSent', - 'totalSent' => 'setTotalSent' + 'previous_month_total_sent' => 'setPreviousMonthTotalSent', + 'current_month_total_sent' => 'setCurrentMonthTotalSent', + 'total_sent' => 'setTotalSent' ]; /** @@ -123,9 +123,9 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'previousMonthTotalSent' => 'getPreviousMonthTotalSent', - 'currentMonthTotalSent' => 'getCurrentMonthTotalSent', - 'totalSent' => 'getTotalSent' + 'previous_month_total_sent' => 'getPreviousMonthTotalSent', + 'current_month_total_sent' => 'getCurrentMonthTotalSent', + 'total_sent' => 'getTotalSent' ]; /** @@ -188,9 +188,9 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['previousMonthTotalSent'] = isset($data['previousMonthTotalSent']) ? $data['previousMonthTotalSent'] : null; - $this->container['currentMonthTotalSent'] = isset($data['currentMonthTotalSent']) ? $data['currentMonthTotalSent'] : null; - $this->container['totalSent'] = isset($data['totalSent']) ? $data['totalSent'] : null; + $this->container['previous_month_total_sent'] = isset($data['previous_month_total_sent']) ? $data['previous_month_total_sent'] : null; + $this->container['current_month_total_sent'] = isset($data['current_month_total_sent']) ? $data['current_month_total_sent'] : null; + $this->container['total_sent'] = isset($data['total_sent']) ? $data['total_sent'] : null; } /** @@ -218,73 +218,73 @@ public function valid() /** - * Gets previousMonthTotalSent + * Gets previous_month_total_sent * * @return int */ public function getPreviousMonthTotalSent() { - return $this->container['previousMonthTotalSent']; + return $this->container['previous_month_total_sent']; } /** - * Sets previousMonthTotalSent + * Sets previous_month_total_sent * - * @param int $previousMonthTotalSent Overall emails sent for the previous month + * @param int $previous_month_total_sent Overall emails sent for the previous month * * @return $this */ - public function setPreviousMonthTotalSent($previousMonthTotalSent) + public function setPreviousMonthTotalSent($previous_month_total_sent) { - $this->container['previousMonthTotalSent'] = $previousMonthTotalSent; + $this->container['previous_month_total_sent'] = $previous_month_total_sent; return $this; } /** - * Gets currentMonthTotalSent + * Gets current_month_total_sent * * @return int */ public function getCurrentMonthTotalSent() { - return $this->container['currentMonthTotalSent']; + return $this->container['current_month_total_sent']; } /** - * Sets currentMonthTotalSent + * Sets current_month_total_sent * - * @param int $currentMonthTotalSent Overall emails sent for current month + * @param int $current_month_total_sent Overall emails sent for current month * * @return $this */ - public function setCurrentMonthTotalSent($currentMonthTotalSent) + public function setCurrentMonthTotalSent($current_month_total_sent) { - $this->container['currentMonthTotalSent'] = $currentMonthTotalSent; + $this->container['current_month_total_sent'] = $current_month_total_sent; return $this; } /** - * Gets totalSent + * Gets total_sent * * @return int */ public function getTotalSent() { - return $this->container['totalSent']; + return $this->container['total_sent']; } /** - * Sets totalSent + * Sets total_sent * - * @param int $totalSent Overall emails sent for since the account exists + * @param int $total_sent Overall emails sent for since the account exists * * @return $this */ - public function setTotalSent($totalSent) + public function setTotalSent($total_sent) { - $this->container['totalSent'] = $totalSent; + $this->container['total_sent'] = $total_sent; return $this; } @@ -295,6 +295,7 @@ public function setTotalSent($totalSent) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -307,6 +308,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -320,6 +322,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -336,6 +339,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetChildrenList.php b/lib/Model/GetChildrenList.php index 230a543f..0f9c77c6 100644 --- a/lib/Model/GetChildrenList.php +++ b/lib/Model/GetChildrenList.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -195,6 +195,9 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['count'] === null) { + $invalidProperties[] = "'count' can't be null"; + } return $invalidProperties; } @@ -264,6 +267,7 @@ public function setCount($count) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -276,6 +280,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -289,6 +294,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -305,6 +311,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetClient.php b/lib/Model/GetClient.php index 819cf76d..39ac60c6 100644 --- a/lib/Model/GetClient.php +++ b/lib/Model/GetClient.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -58,9 +58,9 @@ class GetClient implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'email' => 'string', - 'firstName' => 'string', - 'lastName' => 'string', - 'companyName' => 'string' + 'first_name' => 'string', + 'last_name' => 'string', + 'company_name' => 'string' ]; /** @@ -70,9 +70,9 @@ class GetClient implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'email' => 'email', - 'firstName' => null, - 'lastName' => null, - 'companyName' => null + 'first_name' => null, + 'last_name' => null, + 'company_name' => null ]; /** @@ -103,9 +103,9 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'email' => 'email', - 'firstName' => 'firstName', - 'lastName' => 'lastName', - 'companyName' => 'companyName' + 'first_name' => 'firstName', + 'last_name' => 'lastName', + 'company_name' => 'companyName' ]; /** @@ -115,9 +115,9 @@ public static function swaggerFormats() */ protected static $setters = [ 'email' => 'setEmail', - 'firstName' => 'setFirstName', - 'lastName' => 'setLastName', - 'companyName' => 'setCompanyName' + 'first_name' => 'setFirstName', + 'last_name' => 'setLastName', + 'company_name' => 'setCompanyName' ]; /** @@ -127,9 +127,9 @@ public static function swaggerFormats() */ protected static $getters = [ 'email' => 'getEmail', - 'firstName' => 'getFirstName', - 'lastName' => 'getLastName', - 'companyName' => 'getCompanyName' + 'first_name' => 'getFirstName', + 'last_name' => 'getLastName', + 'company_name' => 'getCompanyName' ]; /** @@ -193,9 +193,9 @@ public function getModelName() public function __construct(array $data = null) { $this->container['email'] = isset($data['email']) ? $data['email'] : null; - $this->container['firstName'] = isset($data['firstName']) ? $data['firstName'] : null; - $this->container['lastName'] = isset($data['lastName']) ? $data['lastName'] : null; - $this->container['companyName'] = isset($data['companyName']) ? $data['companyName'] : null; + $this->container['first_name'] = isset($data['first_name']) ? $data['first_name'] : null; + $this->container['last_name'] = isset($data['last_name']) ? $data['last_name'] : null; + $this->container['company_name'] = isset($data['company_name']) ? $data['company_name'] : null; } /** @@ -210,14 +210,14 @@ public function listInvalidProperties() if ($this->container['email'] === null) { $invalidProperties[] = "'email' can't be null"; } - if ($this->container['firstName'] === null) { - $invalidProperties[] = "'firstName' can't be null"; + if ($this->container['first_name'] === null) { + $invalidProperties[] = "'first_name' can't be null"; } - if ($this->container['lastName'] === null) { - $invalidProperties[] = "'lastName' can't be null"; + if ($this->container['last_name'] === null) { + $invalidProperties[] = "'last_name' can't be null"; } - if ($this->container['companyName'] === null) { - $invalidProperties[] = "'companyName' can't be null"; + if ($this->container['company_name'] === null) { + $invalidProperties[] = "'company_name' can't be null"; } return $invalidProperties; } @@ -259,73 +259,73 @@ public function setEmail($email) } /** - * Gets firstName + * Gets first_name * * @return string */ public function getFirstName() { - return $this->container['firstName']; + return $this->container['first_name']; } /** - * Sets firstName + * Sets first_name * - * @param string $firstName First Name + * @param string $first_name First Name * * @return $this */ - public function setFirstName($firstName) + public function setFirstName($first_name) { - $this->container['firstName'] = $firstName; + $this->container['first_name'] = $first_name; return $this; } /** - * Gets lastName + * Gets last_name * * @return string */ public function getLastName() { - return $this->container['lastName']; + return $this->container['last_name']; } /** - * Sets lastName + * Sets last_name * - * @param string $lastName Last Name + * @param string $last_name Last Name * * @return $this */ - public function setLastName($lastName) + public function setLastName($last_name) { - $this->container['lastName'] = $lastName; + $this->container['last_name'] = $last_name; return $this; } /** - * Gets companyName + * Gets company_name * * @return string */ public function getCompanyName() { - return $this->container['companyName']; + return $this->container['company_name']; } /** - * Sets companyName + * Sets company_name * - * @param string $companyName Name of the company + * @param string $company_name Name of the company * * @return $this */ - public function setCompanyName($companyName) + public function setCompanyName($company_name) { - $this->container['companyName'] = $companyName; + $this->container['company_name'] = $company_name; return $this; } @@ -336,6 +336,7 @@ public function setCompanyName($companyName) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -348,6 +349,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -361,6 +363,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -377,6 +380,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetContactCampaignStats.php b/lib/Model/GetContactCampaignStats.php index 43fc6aaa..a7734d7c 100644 --- a/lib/Model/GetContactCampaignStats.php +++ b/lib/Model/GetContactCampaignStats.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -58,15 +58,14 @@ class GetContactCampaignStats implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'messagesSent' => '\SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]', - 'hardBounces' => '\SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]', - 'softBounces' => '\SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]', + 'messages_sent' => '\SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]', + 'hard_bounces' => '\SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]', + 'soft_bounces' => '\SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]', 'complaints' => '\SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]', 'unsubscriptions' => '\SendinBlue\Client\Model\GetContactCampaignStatsUnsubscriptions', 'opened' => '\SendinBlue\Client\Model\GetContactCampaignStatsOpened[]', 'clicked' => '\SendinBlue\Client\Model\GetContactCampaignStatsClicked[]', - 'transacAttributes' => '\SendinBlue\Client\Model\GetContactCampaignStatsTransacAttributes[]', - 'delivered' => '\SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]' + 'transac_attributes' => '\SendinBlue\Client\Model\GetContactCampaignStatsTransacAttributes[]' ]; /** @@ -75,15 +74,14 @@ class GetContactCampaignStats implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'messagesSent' => null, - 'hardBounces' => null, - 'softBounces' => null, + 'messages_sent' => null, + 'hard_bounces' => null, + 'soft_bounces' => null, 'complaints' => null, 'unsubscriptions' => null, 'opened' => null, 'clicked' => null, - 'transacAttributes' => null, - 'delivered' => null + 'transac_attributes' => null ]; /** @@ -113,15 +111,14 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'messagesSent' => 'messagesSent', - 'hardBounces' => 'hardBounces', - 'softBounces' => 'softBounces', + 'messages_sent' => 'messagesSent', + 'hard_bounces' => 'hardBounces', + 'soft_bounces' => 'softBounces', 'complaints' => 'complaints', 'unsubscriptions' => 'unsubscriptions', 'opened' => 'opened', 'clicked' => 'clicked', - 'transacAttributes' => 'transacAttributes', - 'delivered' => 'delivered' + 'transac_attributes' => 'transacAttributes' ]; /** @@ -130,15 +127,14 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'messagesSent' => 'setMessagesSent', - 'hardBounces' => 'setHardBounces', - 'softBounces' => 'setSoftBounces', + 'messages_sent' => 'setMessagesSent', + 'hard_bounces' => 'setHardBounces', + 'soft_bounces' => 'setSoftBounces', 'complaints' => 'setComplaints', 'unsubscriptions' => 'setUnsubscriptions', 'opened' => 'setOpened', 'clicked' => 'setClicked', - 'transacAttributes' => 'setTransacAttributes', - 'delivered' => 'setDelivered' + 'transac_attributes' => 'setTransacAttributes' ]; /** @@ -147,15 +143,14 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'messagesSent' => 'getMessagesSent', - 'hardBounces' => 'getHardBounces', - 'softBounces' => 'getSoftBounces', + 'messages_sent' => 'getMessagesSent', + 'hard_bounces' => 'getHardBounces', + 'soft_bounces' => 'getSoftBounces', 'complaints' => 'getComplaints', 'unsubscriptions' => 'getUnsubscriptions', 'opened' => 'getOpened', 'clicked' => 'getClicked', - 'transacAttributes' => 'getTransacAttributes', - 'delivered' => 'getDelivered' + 'transac_attributes' => 'getTransacAttributes' ]; /** @@ -218,15 +213,14 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['messagesSent'] = isset($data['messagesSent']) ? $data['messagesSent'] : null; - $this->container['hardBounces'] = isset($data['hardBounces']) ? $data['hardBounces'] : null; - $this->container['softBounces'] = isset($data['softBounces']) ? $data['softBounces'] : null; + $this->container['messages_sent'] = isset($data['messages_sent']) ? $data['messages_sent'] : null; + $this->container['hard_bounces'] = isset($data['hard_bounces']) ? $data['hard_bounces'] : null; + $this->container['soft_bounces'] = isset($data['soft_bounces']) ? $data['soft_bounces'] : null; $this->container['complaints'] = isset($data['complaints']) ? $data['complaints'] : null; $this->container['unsubscriptions'] = isset($data['unsubscriptions']) ? $data['unsubscriptions'] : null; $this->container['opened'] = isset($data['opened']) ? $data['opened'] : null; $this->container['clicked'] = isset($data['clicked']) ? $data['clicked'] : null; - $this->container['transacAttributes'] = isset($data['transacAttributes']) ? $data['transacAttributes'] : null; - $this->container['delivered'] = isset($data['delivered']) ? $data['delivered'] : null; + $this->container['transac_attributes'] = isset($data['transac_attributes']) ? $data['transac_attributes'] : null; } /** @@ -254,73 +248,73 @@ public function valid() /** - * Gets messagesSent + * Gets messages_sent * * @return \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] */ public function getMessagesSent() { - return $this->container['messagesSent']; + return $this->container['messages_sent']; } /** - * Sets messagesSent + * Sets messages_sent * - * @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] $messagesSent messagesSent + * @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] $messages_sent messages_sent * * @return $this */ - public function setMessagesSent($messagesSent) + public function setMessagesSent($messages_sent) { - $this->container['messagesSent'] = $messagesSent; + $this->container['messages_sent'] = $messages_sent; return $this; } /** - * Gets hardBounces + * Gets hard_bounces * * @return \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] */ public function getHardBounces() { - return $this->container['hardBounces']; + return $this->container['hard_bounces']; } /** - * Sets hardBounces + * Sets hard_bounces * - * @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] $hardBounces hardBounces + * @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] $hard_bounces hard_bounces * * @return $this */ - public function setHardBounces($hardBounces) + public function setHardBounces($hard_bounces) { - $this->container['hardBounces'] = $hardBounces; + $this->container['hard_bounces'] = $hard_bounces; return $this; } /** - * Gets softBounces + * Gets soft_bounces * * @return \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] */ public function getSoftBounces() { - return $this->container['softBounces']; + return $this->container['soft_bounces']; } /** - * Sets softBounces + * Sets soft_bounces * - * @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] $softBounces softBounces + * @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] $soft_bounces soft_bounces * * @return $this */ - public function setSoftBounces($softBounces) + public function setSoftBounces($soft_bounces) { - $this->container['softBounces'] = $softBounces; + $this->container['soft_bounces'] = $soft_bounces; return $this; } @@ -422,49 +416,25 @@ public function setClicked($clicked) } /** - * Gets transacAttributes + * Gets transac_attributes * * @return \SendinBlue\Client\Model\GetContactCampaignStatsTransacAttributes[] */ public function getTransacAttributes() { - return $this->container['transacAttributes']; + return $this->container['transac_attributes']; } /** - * Sets transacAttributes + * Sets transac_attributes * - * @param \SendinBlue\Client\Model\GetContactCampaignStatsTransacAttributes[] $transacAttributes transacAttributes + * @param \SendinBlue\Client\Model\GetContactCampaignStatsTransacAttributes[] $transac_attributes transac_attributes * * @return $this */ - public function setTransacAttributes($transacAttributes) + public function setTransacAttributes($transac_attributes) { - $this->container['transacAttributes'] = $transacAttributes; - - return $this; - } - - /** - * Gets delivered - * - * @return \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] - */ - public function getDelivered() - { - return $this->container['delivered']; - } - - /** - * Sets delivered - * - * @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] $delivered delivered - * - * @return $this - */ - public function setDelivered($delivered) - { - $this->container['delivered'] = $delivered; + $this->container['transac_attributes'] = $transac_attributes; return $this; } @@ -475,6 +445,7 @@ public function setDelivered($delivered) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -487,6 +458,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -500,6 +472,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -516,6 +489,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetContactCampaignStatsClicked.php b/lib/Model/GetContactCampaignStatsClicked.php index 4d51924a..cd8fd409 100644 --- a/lib/Model/GetContactCampaignStatsClicked.php +++ b/lib/Model/GetContactCampaignStatsClicked.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -57,7 +57,7 @@ class GetContactCampaignStatsClicked implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'campaignId' => 'int', + 'campaign_id' => 'int', 'links' => '\SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsLinks[]' ]; @@ -67,7 +67,7 @@ class GetContactCampaignStatsClicked implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'campaignId' => 'int64', + 'campaign_id' => 'int64', 'links' => null ]; @@ -98,7 +98,7 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'campaignId' => 'campaignId', + 'campaign_id' => 'campaignId', 'links' => 'links' ]; @@ -108,7 +108,7 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'campaignId' => 'setCampaignId', + 'campaign_id' => 'setCampaignId', 'links' => 'setLinks' ]; @@ -118,7 +118,7 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'campaignId' => 'getCampaignId', + 'campaign_id' => 'getCampaignId', 'links' => 'getLinks' ]; @@ -182,7 +182,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['campaignId'] = isset($data['campaignId']) ? $data['campaignId'] : null; + $this->container['campaign_id'] = isset($data['campaign_id']) ? $data['campaign_id'] : null; $this->container['links'] = isset($data['links']) ? $data['links'] : null; } @@ -195,8 +195,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['campaignId'] === null) { - $invalidProperties[] = "'campaignId' can't be null"; + if ($this->container['campaign_id'] === null) { + $invalidProperties[] = "'campaign_id' can't be null"; } if ($this->container['links'] === null) { $invalidProperties[] = "'links' can't be null"; @@ -217,25 +217,25 @@ public function valid() /** - * Gets campaignId + * Gets campaign_id * * @return int */ public function getCampaignId() { - return $this->container['campaignId']; + return $this->container['campaign_id']; } /** - * Sets campaignId + * Sets campaign_id * - * @param int $campaignId ID of the campaign which generated the event + * @param int $campaign_id ID of the campaign which generated the event * * @return $this */ - public function setCampaignId($campaignId) + public function setCampaignId($campaign_id) { - $this->container['campaignId'] = $campaignId; + $this->container['campaign_id'] = $campaign_id; return $this; } @@ -270,6 +270,7 @@ public function setLinks($links) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -282,6 +283,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -295,6 +297,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -311,6 +314,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetContactCampaignStatsOpened.php b/lib/Model/GetContactCampaignStatsOpened.php index 00f5d2f1..f3e294f9 100644 --- a/lib/Model/GetContactCampaignStatsOpened.php +++ b/lib/Model/GetContactCampaignStatsOpened.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -57,9 +57,9 @@ class GetContactCampaignStatsOpened implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'campaignId' => 'int', + 'campaign_id' => 'int', 'count' => 'int', - 'eventTime' => 'string', + 'event_time' => '\DateTime', 'ip' => 'string' ]; @@ -69,9 +69,9 @@ class GetContactCampaignStatsOpened implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'campaignId' => 'int64', + 'campaign_id' => 'int64', 'count' => 'int64', - 'eventTime' => null, + 'event_time' => 'date-time', 'ip' => null ]; @@ -102,9 +102,9 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'campaignId' => 'campaignId', + 'campaign_id' => 'campaignId', 'count' => 'count', - 'eventTime' => 'eventTime', + 'event_time' => 'eventTime', 'ip' => 'ip' ]; @@ -114,9 +114,9 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'campaignId' => 'setCampaignId', + 'campaign_id' => 'setCampaignId', 'count' => 'setCount', - 'eventTime' => 'setEventTime', + 'event_time' => 'setEventTime', 'ip' => 'setIp' ]; @@ -126,9 +126,9 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'campaignId' => 'getCampaignId', + 'campaign_id' => 'getCampaignId', 'count' => 'getCount', - 'eventTime' => 'getEventTime', + 'event_time' => 'getEventTime', 'ip' => 'getIp' ]; @@ -192,9 +192,9 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['campaignId'] = isset($data['campaignId']) ? $data['campaignId'] : null; + $this->container['campaign_id'] = isset($data['campaign_id']) ? $data['campaign_id'] : null; $this->container['count'] = isset($data['count']) ? $data['count'] : null; - $this->container['eventTime'] = isset($data['eventTime']) ? $data['eventTime'] : null; + $this->container['event_time'] = isset($data['event_time']) ? $data['event_time'] : null; $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; } @@ -207,14 +207,14 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['campaignId'] === null) { - $invalidProperties[] = "'campaignId' can't be null"; + if ($this->container['campaign_id'] === null) { + $invalidProperties[] = "'campaign_id' can't be null"; } if ($this->container['count'] === null) { $invalidProperties[] = "'count' can't be null"; } - if ($this->container['eventTime'] === null) { - $invalidProperties[] = "'eventTime' can't be null"; + if ($this->container['event_time'] === null) { + $invalidProperties[] = "'event_time' can't be null"; } if ($this->container['ip'] === null) { $invalidProperties[] = "'ip' can't be null"; @@ -235,25 +235,25 @@ public function valid() /** - * Gets campaignId + * Gets campaign_id * * @return int */ public function getCampaignId() { - return $this->container['campaignId']; + return $this->container['campaign_id']; } /** - * Sets campaignId + * Sets campaign_id * - * @param int $campaignId ID of the campaign which generated the event + * @param int $campaign_id ID of the campaign which generated the event * * @return $this */ - public function setCampaignId($campaignId) + public function setCampaignId($campaign_id) { - $this->container['campaignId'] = $campaignId; + $this->container['campaign_id'] = $campaign_id; return $this; } @@ -283,25 +283,25 @@ public function setCount($count) } /** - * Gets eventTime + * Gets event_time * - * @return string + * @return \DateTime */ public function getEventTime() { - return $this->container['eventTime']; + return $this->container['event_time']; } /** - * Sets eventTime + * Sets event_time * - * @param string $eventTime UTC date-time of the event + * @param \DateTime $event_time UTC date-time of the event * * @return $this */ - public function setEventTime($eventTime) + public function setEventTime($event_time) { - $this->container['eventTime'] = $eventTime; + $this->container['event_time'] = $event_time; return $this; } @@ -336,6 +336,7 @@ public function setIp($ip) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -348,6 +349,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -361,6 +363,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -377,6 +380,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetContactCampaignStatsTransacAttributes.php b/lib/Model/GetContactCampaignStatsTransacAttributes.php index 40bec505..dc6a4050 100644 --- a/lib/Model/GetContactCampaignStatsTransacAttributes.php +++ b/lib/Model/GetContactCampaignStatsTransacAttributes.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -57,9 +57,9 @@ class GetContactCampaignStatsTransacAttributes implements ModelInterface, ArrayA * @var string[] */ protected static $swaggerTypes = [ - 'orderDate' => '\DateTime', - 'orderPrice' => 'float', - 'orderId' => 'int' + 'order_date' => '\DateTime', + 'order_price' => 'float', + 'order_id' => 'int' ]; /** @@ -68,9 +68,9 @@ class GetContactCampaignStatsTransacAttributes implements ModelInterface, ArrayA * @var string[] */ protected static $swaggerFormats = [ - 'orderDate' => 'date', - 'orderPrice' => 'float', - 'orderId' => 'int64' + 'order_date' => 'date', + 'order_price' => 'float', + 'order_id' => 'int64' ]; /** @@ -100,9 +100,9 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'orderDate' => 'orderDate', - 'orderPrice' => 'orderPrice', - 'orderId' => 'orderId' + 'order_date' => 'orderDate', + 'order_price' => 'orderPrice', + 'order_id' => 'orderId' ]; /** @@ -111,9 +111,9 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'orderDate' => 'setOrderDate', - 'orderPrice' => 'setOrderPrice', - 'orderId' => 'setOrderId' + 'order_date' => 'setOrderDate', + 'order_price' => 'setOrderPrice', + 'order_id' => 'setOrderId' ]; /** @@ -122,9 +122,9 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'orderDate' => 'getOrderDate', - 'orderPrice' => 'getOrderPrice', - 'orderId' => 'getOrderId' + 'order_date' => 'getOrderDate', + 'order_price' => 'getOrderPrice', + 'order_id' => 'getOrderId' ]; /** @@ -187,9 +187,9 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['orderDate'] = isset($data['orderDate']) ? $data['orderDate'] : null; - $this->container['orderPrice'] = isset($data['orderPrice']) ? $data['orderPrice'] : null; - $this->container['orderId'] = isset($data['orderId']) ? $data['orderId'] : null; + $this->container['order_date'] = isset($data['order_date']) ? $data['order_date'] : null; + $this->container['order_price'] = isset($data['order_price']) ? $data['order_price'] : null; + $this->container['order_id'] = isset($data['order_id']) ? $data['order_id'] : null; } /** @@ -201,14 +201,14 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['orderDate'] === null) { - $invalidProperties[] = "'orderDate' can't be null"; + if ($this->container['order_date'] === null) { + $invalidProperties[] = "'order_date' can't be null"; } - if ($this->container['orderPrice'] === null) { - $invalidProperties[] = "'orderPrice' can't be null"; + if ($this->container['order_price'] === null) { + $invalidProperties[] = "'order_price' can't be null"; } - if ($this->container['orderId'] === null) { - $invalidProperties[] = "'orderId' can't be null"; + if ($this->container['order_id'] === null) { + $invalidProperties[] = "'order_id' can't be null"; } return $invalidProperties; } @@ -226,73 +226,73 @@ public function valid() /** - * Gets orderDate + * Gets order_date * * @return \DateTime */ public function getOrderDate() { - return $this->container['orderDate']; + return $this->container['order_date']; } /** - * Sets orderDate + * Sets order_date * - * @param \DateTime $orderDate Date of the order + * @param \DateTime $order_date Date of the order * * @return $this */ - public function setOrderDate($orderDate) + public function setOrderDate($order_date) { - $this->container['orderDate'] = $orderDate; + $this->container['order_date'] = $order_date; return $this; } /** - * Gets orderPrice + * Gets order_price * * @return float */ public function getOrderPrice() { - return $this->container['orderPrice']; + return $this->container['order_price']; } /** - * Sets orderPrice + * Sets order_price * - * @param float $orderPrice Price of the order + * @param float $order_price Price of the order * * @return $this */ - public function setOrderPrice($orderPrice) + public function setOrderPrice($order_price) { - $this->container['orderPrice'] = $orderPrice; + $this->container['order_price'] = $order_price; return $this; } /** - * Gets orderId + * Gets order_id * * @return int */ public function getOrderId() { - return $this->container['orderId']; + return $this->container['order_id']; } /** - * Sets orderId + * Sets order_id * - * @param int $orderId ID of the order + * @param int $order_id ID of the order * * @return $this */ - public function setOrderId($orderId) + public function setOrderId($order_id) { - $this->container['orderId'] = $orderId; + $this->container['order_id'] = $order_id; return $this; } @@ -303,6 +303,7 @@ public function setOrderId($orderId) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -315,6 +316,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -328,6 +330,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -344,6 +347,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetContactCampaignStatsUnsubscriptions.php b/lib/Model/GetContactCampaignStatsUnsubscriptions.php index a962e469..9f691ca1 100644 --- a/lib/Model/GetContactCampaignStatsUnsubscriptions.php +++ b/lib/Model/GetContactCampaignStatsUnsubscriptions.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -57,8 +57,8 @@ class GetContactCampaignStatsUnsubscriptions implements ModelInterface, ArrayAcc * @var string[] */ protected static $swaggerTypes = [ - 'userUnsubscription' => '\SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription[]', - 'adminUnsubscription' => '\SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription[]' + 'user_unsubscription' => '\SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription[]', + 'admin_unsubscription' => '\SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription[]' ]; /** @@ -67,8 +67,8 @@ class GetContactCampaignStatsUnsubscriptions implements ModelInterface, ArrayAcc * @var string[] */ protected static $swaggerFormats = [ - 'userUnsubscription' => null, - 'adminUnsubscription' => null + 'user_unsubscription' => null, + 'admin_unsubscription' => null ]; /** @@ -98,8 +98,8 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'userUnsubscription' => 'userUnsubscription', - 'adminUnsubscription' => 'adminUnsubscription' + 'user_unsubscription' => 'userUnsubscription', + 'admin_unsubscription' => 'adminUnsubscription' ]; /** @@ -108,8 +108,8 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'userUnsubscription' => 'setUserUnsubscription', - 'adminUnsubscription' => 'setAdminUnsubscription' + 'user_unsubscription' => 'setUserUnsubscription', + 'admin_unsubscription' => 'setAdminUnsubscription' ]; /** @@ -118,8 +118,8 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'userUnsubscription' => 'getUserUnsubscription', - 'adminUnsubscription' => 'getAdminUnsubscription' + 'user_unsubscription' => 'getUserUnsubscription', + 'admin_unsubscription' => 'getAdminUnsubscription' ]; /** @@ -182,8 +182,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['userUnsubscription'] = isset($data['userUnsubscription']) ? $data['userUnsubscription'] : null; - $this->container['adminUnsubscription'] = isset($data['adminUnsubscription']) ? $data['adminUnsubscription'] : null; + $this->container['user_unsubscription'] = isset($data['user_unsubscription']) ? $data['user_unsubscription'] : null; + $this->container['admin_unsubscription'] = isset($data['admin_unsubscription']) ? $data['admin_unsubscription'] : null; } /** @@ -195,11 +195,11 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['userUnsubscription'] === null) { - $invalidProperties[] = "'userUnsubscription' can't be null"; + if ($this->container['user_unsubscription'] === null) { + $invalidProperties[] = "'user_unsubscription' can't be null"; } - if ($this->container['adminUnsubscription'] === null) { - $invalidProperties[] = "'adminUnsubscription' can't be null"; + if ($this->container['admin_unsubscription'] === null) { + $invalidProperties[] = "'admin_unsubscription' can't be null"; } return $invalidProperties; } @@ -217,49 +217,49 @@ public function valid() /** - * Gets userUnsubscription + * Gets user_unsubscription * * @return \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription[] */ public function getUserUnsubscription() { - return $this->container['userUnsubscription']; + return $this->container['user_unsubscription']; } /** - * Sets userUnsubscription + * Sets user_unsubscription * - * @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription[] $userUnsubscription Contact has unsubscribed via the unsubscription link in the email + * @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription[] $user_unsubscription Contact has unsubscribed via the unsubscription link in the email * * @return $this */ - public function setUserUnsubscription($userUnsubscription) + public function setUserUnsubscription($user_unsubscription) { - $this->container['userUnsubscription'] = $userUnsubscription; + $this->container['user_unsubscription'] = $user_unsubscription; return $this; } /** - * Gets adminUnsubscription + * Gets admin_unsubscription * * @return \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription[] */ public function getAdminUnsubscription() { - return $this->container['adminUnsubscription']; + return $this->container['admin_unsubscription']; } /** - * Sets adminUnsubscription + * Sets admin_unsubscription * - * @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription[] $adminUnsubscription Contact has been unsubscribed from the administrator + * @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription[] $admin_unsubscription Contact has been unsubscribed from the administrator * * @return $this */ - public function setAdminUnsubscription($adminUnsubscription) + public function setAdminUnsubscription($admin_unsubscription) { - $this->container['adminUnsubscription'] = $adminUnsubscription; + $this->container['admin_unsubscription'] = $admin_unsubscription; return $this; } @@ -270,6 +270,7 @@ public function setAdminUnsubscription($adminUnsubscription) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -282,6 +283,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -295,6 +297,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -311,6 +314,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetContactDetails.php b/lib/Model/GetContactDetails.php index 1e7e6221..0f4b2681 100644 --- a/lib/Model/GetContactDetails.php +++ b/lib/Model/GetContactDetails.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -59,12 +59,12 @@ class GetContactDetails implements ModelInterface, ArrayAccess protected static $swaggerTypes = [ 'email' => 'string', 'id' => 'int', - 'emailBlacklisted' => 'bool', - 'smsBlacklisted' => 'bool', - 'createdAt' => 'string', - 'modifiedAt' => 'string', - 'listIds' => 'int[]', - 'listUnsubscribed' => 'int[]', + 'email_blacklisted' => 'bool', + 'sms_blacklisted' => 'bool', + 'created_at' => '\DateTime', + 'modified_at' => '\DateTime', + 'list_ids' => 'int[]', + 'list_unsubscribed' => 'int[]', 'attributes' => 'object' ]; @@ -76,12 +76,12 @@ class GetContactDetails implements ModelInterface, ArrayAccess protected static $swaggerFormats = [ 'email' => 'email', 'id' => 'int64', - 'emailBlacklisted' => null, - 'smsBlacklisted' => null, - 'createdAt' => null, - 'modifiedAt' => null, - 'listIds' => 'int64', - 'listUnsubscribed' => 'int64', + 'email_blacklisted' => null, + 'sms_blacklisted' => null, + 'created_at' => 'date-time', + 'modified_at' => 'date-time', + 'list_ids' => 'int64', + 'list_unsubscribed' => 'int64', 'attributes' => null ]; @@ -114,12 +114,12 @@ public static function swaggerFormats() protected static $attributeMap = [ 'email' => 'email', 'id' => 'id', - 'emailBlacklisted' => 'emailBlacklisted', - 'smsBlacklisted' => 'smsBlacklisted', - 'createdAt' => 'createdAt', - 'modifiedAt' => 'modifiedAt', - 'listIds' => 'listIds', - 'listUnsubscribed' => 'listUnsubscribed', + 'email_blacklisted' => 'emailBlacklisted', + 'sms_blacklisted' => 'smsBlacklisted', + 'created_at' => 'createdAt', + 'modified_at' => 'modifiedAt', + 'list_ids' => 'listIds', + 'list_unsubscribed' => 'listUnsubscribed', 'attributes' => 'attributes' ]; @@ -131,12 +131,12 @@ public static function swaggerFormats() protected static $setters = [ 'email' => 'setEmail', 'id' => 'setId', - 'emailBlacklisted' => 'setEmailBlacklisted', - 'smsBlacklisted' => 'setSmsBlacklisted', - 'createdAt' => 'setCreatedAt', - 'modifiedAt' => 'setModifiedAt', - 'listIds' => 'setListIds', - 'listUnsubscribed' => 'setListUnsubscribed', + 'email_blacklisted' => 'setEmailBlacklisted', + 'sms_blacklisted' => 'setSmsBlacklisted', + 'created_at' => 'setCreatedAt', + 'modified_at' => 'setModifiedAt', + 'list_ids' => 'setListIds', + 'list_unsubscribed' => 'setListUnsubscribed', 'attributes' => 'setAttributes' ]; @@ -148,12 +148,12 @@ public static function swaggerFormats() protected static $getters = [ 'email' => 'getEmail', 'id' => 'getId', - 'emailBlacklisted' => 'getEmailBlacklisted', - 'smsBlacklisted' => 'getSmsBlacklisted', - 'createdAt' => 'getCreatedAt', - 'modifiedAt' => 'getModifiedAt', - 'listIds' => 'getListIds', - 'listUnsubscribed' => 'getListUnsubscribed', + 'email_blacklisted' => 'getEmailBlacklisted', + 'sms_blacklisted' => 'getSmsBlacklisted', + 'created_at' => 'getCreatedAt', + 'modified_at' => 'getModifiedAt', + 'list_ids' => 'getListIds', + 'list_unsubscribed' => 'getListUnsubscribed', 'attributes' => 'getAttributes' ]; @@ -219,12 +219,12 @@ public function __construct(array $data = null) { $this->container['email'] = isset($data['email']) ? $data['email'] : null; $this->container['id'] = isset($data['id']) ? $data['id'] : null; - $this->container['emailBlacklisted'] = isset($data['emailBlacklisted']) ? $data['emailBlacklisted'] : null; - $this->container['smsBlacklisted'] = isset($data['smsBlacklisted']) ? $data['smsBlacklisted'] : null; - $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; - $this->container['modifiedAt'] = isset($data['modifiedAt']) ? $data['modifiedAt'] : null; - $this->container['listIds'] = isset($data['listIds']) ? $data['listIds'] : null; - $this->container['listUnsubscribed'] = isset($data['listUnsubscribed']) ? $data['listUnsubscribed'] : null; + $this->container['email_blacklisted'] = isset($data['email_blacklisted']) ? $data['email_blacklisted'] : null; + $this->container['sms_blacklisted'] = isset($data['sms_blacklisted']) ? $data['sms_blacklisted'] : null; + $this->container['created_at'] = isset($data['created_at']) ? $data['created_at'] : null; + $this->container['modified_at'] = isset($data['modified_at']) ? $data['modified_at'] : null; + $this->container['list_ids'] = isset($data['list_ids']) ? $data['list_ids'] : null; + $this->container['list_unsubscribed'] = isset($data['list_unsubscribed']) ? $data['list_unsubscribed'] : null; $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; } @@ -243,20 +243,20 @@ public function listInvalidProperties() if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } - if ($this->container['emailBlacklisted'] === null) { - $invalidProperties[] = "'emailBlacklisted' can't be null"; + if ($this->container['email_blacklisted'] === null) { + $invalidProperties[] = "'email_blacklisted' can't be null"; } - if ($this->container['smsBlacklisted'] === null) { - $invalidProperties[] = "'smsBlacklisted' can't be null"; + if ($this->container['sms_blacklisted'] === null) { + $invalidProperties[] = "'sms_blacklisted' can't be null"; } - if ($this->container['createdAt'] === null) { - $invalidProperties[] = "'createdAt' can't be null"; + if ($this->container['created_at'] === null) { + $invalidProperties[] = "'created_at' can't be null"; } - if ($this->container['modifiedAt'] === null) { - $invalidProperties[] = "'modifiedAt' can't be null"; + if ($this->container['modified_at'] === null) { + $invalidProperties[] = "'modified_at' can't be null"; } - if ($this->container['listIds'] === null) { - $invalidProperties[] = "'listIds' can't be null"; + if ($this->container['list_ids'] === null) { + $invalidProperties[] = "'list_ids' can't be null"; } if ($this->container['attributes'] === null) { $invalidProperties[] = "'attributes' can't be null"; @@ -325,145 +325,145 @@ public function setId($id) } /** - * Gets emailBlacklisted + * Gets email_blacklisted * * @return bool */ public function getEmailBlacklisted() { - return $this->container['emailBlacklisted']; + return $this->container['email_blacklisted']; } /** - * Sets emailBlacklisted + * Sets email_blacklisted * - * @param bool $emailBlacklisted Blacklist status for email campaigns (true=blacklisted, false=not blacklisted) + * @param bool $email_blacklisted Blacklist status for email campaigns (true=blacklisted, false=not blacklisted) * * @return $this */ - public function setEmailBlacklisted($emailBlacklisted) + public function setEmailBlacklisted($email_blacklisted) { - $this->container['emailBlacklisted'] = $emailBlacklisted; + $this->container['email_blacklisted'] = $email_blacklisted; return $this; } /** - * Gets smsBlacklisted + * Gets sms_blacklisted * * @return bool */ public function getSmsBlacklisted() { - return $this->container['smsBlacklisted']; + return $this->container['sms_blacklisted']; } /** - * Sets smsBlacklisted + * Sets sms_blacklisted * - * @param bool $smsBlacklisted Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted) + * @param bool $sms_blacklisted Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted) * * @return $this */ - public function setSmsBlacklisted($smsBlacklisted) + public function setSmsBlacklisted($sms_blacklisted) { - $this->container['smsBlacklisted'] = $smsBlacklisted; + $this->container['sms_blacklisted'] = $sms_blacklisted; return $this; } /** - * Gets createdAt + * Gets created_at * - * @return string + * @return \DateTime */ public function getCreatedAt() { - return $this->container['createdAt']; + return $this->container['created_at']; } /** - * Sets createdAt + * Sets created_at * - * @param string $createdAt Creation UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @param \DateTime $created_at Creation UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) * * @return $this */ - public function setCreatedAt($createdAt) + public function setCreatedAt($created_at) { - $this->container['createdAt'] = $createdAt; + $this->container['created_at'] = $created_at; return $this; } /** - * Gets modifiedAt + * Gets modified_at * - * @return string + * @return \DateTime */ public function getModifiedAt() { - return $this->container['modifiedAt']; + return $this->container['modified_at']; } /** - * Sets modifiedAt + * Sets modified_at * - * @param string $modifiedAt Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @param \DateTime $modified_at Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) * * @return $this */ - public function setModifiedAt($modifiedAt) + public function setModifiedAt($modified_at) { - $this->container['modifiedAt'] = $modifiedAt; + $this->container['modified_at'] = $modified_at; return $this; } /** - * Gets listIds + * Gets list_ids * * @return int[] */ public function getListIds() { - return $this->container['listIds']; + return $this->container['list_ids']; } /** - * Sets listIds + * Sets list_ids * - * @param int[] $listIds listIds + * @param int[] $list_ids list_ids * * @return $this */ - public function setListIds($listIds) + public function setListIds($list_ids) { - $this->container['listIds'] = $listIds; + $this->container['list_ids'] = $list_ids; return $this; } /** - * Gets listUnsubscribed + * Gets list_unsubscribed * * @return int[] */ public function getListUnsubscribed() { - return $this->container['listUnsubscribed']; + return $this->container['list_unsubscribed']; } /** - * Sets listUnsubscribed + * Sets list_unsubscribed * - * @param int[] $listUnsubscribed listUnsubscribed + * @param int[] $list_unsubscribed list_unsubscribed * * @return $this */ - public function setListUnsubscribed($listUnsubscribed) + public function setListUnsubscribed($list_unsubscribed) { - $this->container['listUnsubscribed'] = $listUnsubscribed; + $this->container['list_unsubscribed'] = $list_unsubscribed; return $this; } @@ -498,6 +498,7 @@ public function setAttributes($attributes) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -510,6 +511,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -523,6 +525,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -539,6 +542,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetContacts.php b/lib/Model/GetContacts.php index 18d31d57..25fe4b6b 100644 --- a/lib/Model/GetContacts.php +++ b/lib/Model/GetContacts.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -270,6 +270,7 @@ public function setCount($count) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -282,6 +283,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -295,6 +297,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -311,6 +314,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetDeviceBrowserStats.php b/lib/Model/GetDeviceBrowserStats.php index 158876ad..be34357f 100644 --- a/lib/Model/GetDeviceBrowserStats.php +++ b/lib/Model/GetDeviceBrowserStats.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -58,9 +58,9 @@ class GetDeviceBrowserStats implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'clickers' => 'int', - 'uniqueClicks' => 'int', + 'unique_clicks' => 'int', 'viewed' => 'int', - 'uniqueViews' => 'int' + 'unique_views' => 'int' ]; /** @@ -70,9 +70,9 @@ class GetDeviceBrowserStats implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'clickers' => 'int64', - 'uniqueClicks' => 'int64', + 'unique_clicks' => 'int64', 'viewed' => 'int64', - 'uniqueViews' => 'int64' + 'unique_views' => 'int64' ]; /** @@ -103,9 +103,9 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'clickers' => 'clickers', - 'uniqueClicks' => 'uniqueClicks', + 'unique_clicks' => 'uniqueClicks', 'viewed' => 'viewed', - 'uniqueViews' => 'uniqueViews' + 'unique_views' => 'uniqueViews' ]; /** @@ -115,9 +115,9 @@ public static function swaggerFormats() */ protected static $setters = [ 'clickers' => 'setClickers', - 'uniqueClicks' => 'setUniqueClicks', + 'unique_clicks' => 'setUniqueClicks', 'viewed' => 'setViewed', - 'uniqueViews' => 'setUniqueViews' + 'unique_views' => 'setUniqueViews' ]; /** @@ -127,9 +127,9 @@ public static function swaggerFormats() */ protected static $getters = [ 'clickers' => 'getClickers', - 'uniqueClicks' => 'getUniqueClicks', + 'unique_clicks' => 'getUniqueClicks', 'viewed' => 'getViewed', - 'uniqueViews' => 'getUniqueViews' + 'unique_views' => 'getUniqueViews' ]; /** @@ -193,9 +193,9 @@ public function getModelName() public function __construct(array $data = null) { $this->container['clickers'] = isset($data['clickers']) ? $data['clickers'] : null; - $this->container['uniqueClicks'] = isset($data['uniqueClicks']) ? $data['uniqueClicks'] : null; + $this->container['unique_clicks'] = isset($data['unique_clicks']) ? $data['unique_clicks'] : null; $this->container['viewed'] = isset($data['viewed']) ? $data['viewed'] : null; - $this->container['uniqueViews'] = isset($data['uniqueViews']) ? $data['uniqueViews'] : null; + $this->container['unique_views'] = isset($data['unique_views']) ? $data['unique_views'] : null; } /** @@ -210,14 +210,14 @@ public function listInvalidProperties() if ($this->container['clickers'] === null) { $invalidProperties[] = "'clickers' can't be null"; } - if ($this->container['uniqueClicks'] === null) { - $invalidProperties[] = "'uniqueClicks' can't be null"; + if ($this->container['unique_clicks'] === null) { + $invalidProperties[] = "'unique_clicks' can't be null"; } if ($this->container['viewed'] === null) { $invalidProperties[] = "'viewed' can't be null"; } - if ($this->container['uniqueViews'] === null) { - $invalidProperties[] = "'uniqueViews' can't be null"; + if ($this->container['unique_views'] === null) { + $invalidProperties[] = "'unique_views' can't be null"; } return $invalidProperties; } @@ -259,25 +259,25 @@ public function setClickers($clickers) } /** - * Gets uniqueClicks + * Gets unique_clicks * * @return int */ public function getUniqueClicks() { - return $this->container['uniqueClicks']; + return $this->container['unique_clicks']; } /** - * Sets uniqueClicks + * Sets unique_clicks * - * @param int $uniqueClicks Number of unique clicks for the campaign using the particular browser + * @param int $unique_clicks Number of unique clicks for the campaign using the particular browser * * @return $this */ - public function setUniqueClicks($uniqueClicks) + public function setUniqueClicks($unique_clicks) { - $this->container['uniqueClicks'] = $uniqueClicks; + $this->container['unique_clicks'] = $unique_clicks; return $this; } @@ -307,25 +307,25 @@ public function setViewed($viewed) } /** - * Gets uniqueViews + * Gets unique_views * * @return int */ public function getUniqueViews() { - return $this->container['uniqueViews']; + return $this->container['unique_views']; } /** - * Sets uniqueViews + * Sets unique_views * - * @param int $uniqueViews Number of unique openings for the campaign using the particular browser + * @param int $unique_views Number of unique openings for the campaign using the particular browser * * @return $this */ - public function setUniqueViews($uniqueViews) + public function setUniqueViews($unique_views) { - $this->container['uniqueViews'] = $uniqueViews; + $this->container['unique_views'] = $unique_views; return $this; } @@ -336,6 +336,7 @@ public function setUniqueViews($uniqueViews) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -348,6 +349,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -361,6 +363,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -377,6 +380,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetEmailCampaign.php b/lib/Model/GetEmailCampaign.php index 201b9b95..0acceb31 100644 --- a/lib/Model/GetEmailCampaign.php +++ b/lib/Model/GetEmailCampaign.php @@ -9,6 +9,7 @@ * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ + /** * SendinBlue API * @@ -17,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -27,8 +28,6 @@ */ namespace SendinBlue\Client\Model; - -use \ArrayAccess; use \SendinBlue\Client\ObjectSerializer; /** @@ -39,7 +38,7 @@ * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class GetEmailCampaign implements ModelInterface, ArrayAccess +class GetEmailCampaign extends GetExtendedCampaignOverview { const DISCRIMINATOR = null; @@ -49,43 +48,15 @@ class GetEmailCampaign implements ModelInterface, ArrayAccess * @var string */ protected static $swaggerModelName = 'getEmailCampaign'; + /** * Array of property to type mappings. Used for (de)serialization * * @var string[] */ protected static $swaggerTypes = [ - 'id' => 'int', - 'name' => 'string', - 'subject' => 'string', - 'type' => 'string', - 'status' => 'string', - 'scheduledAt' => 'string', - 'abTesting' => 'bool', - 'subjectA' => 'string', - 'subjectB' => 'string', - 'splitRule' => 'int', - 'winnerCriteria' => 'string', - 'winnerDelay' => 'int', - 'sendAtBestTime' => 'bool', - 'testSent' => 'bool', - 'header' => 'string', - 'footer' => 'string', - 'sender' => '\SendinBlue\Client\Model\GetExtendedCampaignOverviewSender', - 'replyTo' => 'string', - 'toField' => 'string', - 'htmlContent' => 'string', - 'shareLink' => 'string', - 'tag' => 'string', - 'createdAt' => 'string', - 'modifiedAt' => 'string', - 'inlineImageActivation' => 'bool', - 'mirrorActive' => 'bool', - 'recurring' => 'bool', - 'sentDate' => 'string', - 'returnBounce' => 'int', - 'recipients' => 'object', - 'statistics' => 'object' + 'recipients' => '\SendinBlue\Client\Model\GetSmsCampaignRecipients', + 'statistics' => '\SendinBlue\Client\Model\GetSmsCampaignRecipients' ]; /** @@ -94,38 +65,10 @@ class GetEmailCampaign implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'id' => 'int64', - 'name' => null, - 'subject' => null, - 'type' => null, - 'status' => null, - 'scheduledAt' => null, - 'abTesting' => null, - 'subjectA' => null, - 'subjectB' => null, - 'splitRule' => null, - 'winnerCriteria' => null, - 'winnerDelay' => null, - 'sendAtBestTime' => null, - 'testSent' => null, - 'header' => null, - 'footer' => null, - 'sender' => null, - 'replyTo' => 'email', - 'toField' => null, - 'htmlContent' => null, - 'shareLink' => 'url', - 'tag' => null, - 'createdAt' => null, - 'modifiedAt' => null, - 'inlineImageActivation' => null, - 'mirrorActive' => null, - 'recurring' => null, - 'sentDate' => null, - 'returnBounce' => 'int64', 'recipients' => null, 'statistics' => null ]; + /** * Array of property to type mappings. Used for (de)serialization * @@ -133,7 +76,7 @@ class GetEmailCampaign implements ModelInterface, ArrayAccess */ public static function swaggerTypes() { - return self::$swaggerTypes; + return self::$swaggerTypes + parent::swaggerTypes(); } /** @@ -143,7 +86,7 @@ public static function swaggerTypes() */ public static function swaggerFormats() { - return self::$swaggerFormats; + return self::$swaggerFormats + parent::swaggerFormats(); } /** @@ -153,114 +96,30 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', - 'name' => 'name', - 'subject' => 'subject', - 'type' => 'type', - 'status' => 'status', - 'scheduledAt' => 'scheduledAt', - 'abTesting' => 'abTesting', - 'subjectA' => 'subjectA', - 'subjectB' => 'subjectB', - 'splitRule' => 'splitRule', - 'winnerCriteria' => 'winnerCriteria', - 'winnerDelay' => 'winnerDelay', - 'sendAtBestTime' => 'sendAtBestTime', - 'testSent' => 'testSent', - 'header' => 'header', - 'footer' => 'footer', - 'sender' => 'sender', - 'replyTo' => 'replyTo', - 'toField' => 'toField', - 'htmlContent' => 'htmlContent', - 'shareLink' => 'shareLink', - 'tag' => 'tag', - 'createdAt' => 'createdAt', - 'modifiedAt' => 'modifiedAt', - 'inlineImageActivation' => 'inlineImageActivation', - 'mirrorActive' => 'mirrorActive', - 'recurring' => 'recurring', - 'sentDate' => 'sentDate', - 'returnBounce' => 'returnBounce', 'recipients' => 'recipients', 'statistics' => 'statistics' ]; + /** * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static $setters = [ - 'id' => 'setId', - 'name' => 'setName', - 'subject' => 'setSubject', - 'type' => 'setType', - 'status' => 'setStatus', - 'scheduledAt' => 'setScheduledAt', - 'abTesting' => 'setAbTesting', - 'subjectA' => 'setSubjectA', - 'subjectB' => 'setSubjectB', - 'splitRule' => 'setSplitRule', - 'winnerCriteria' => 'setWinnerCriteria', - 'winnerDelay' => 'setWinnerDelay', - 'sendAtBestTime' => 'setSendAtBestTime', - 'testSent' => 'setTestSent', - 'header' => 'setHeader', - 'footer' => 'setFooter', - 'sender' => 'setSender', - 'replyTo' => 'setReplyTo', - 'toField' => 'setToField', - 'htmlContent' => 'setHtmlContent', - 'shareLink' => 'setShareLink', - 'tag' => 'setTag', - 'createdAt' => 'setCreatedAt', - 'modifiedAt' => 'setModifiedAt', - 'inlineImageActivation' => 'setInlineImageActivation', - 'mirrorActive' => 'setMirrorActive', - 'recurring' => 'setRecurring', - 'sentDate' => 'setSentDate', - 'returnBounce' => 'setReturnBounce', 'recipients' => 'setRecipients', 'statistics' => 'setStatistics' ]; + /** * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static $getters = [ - 'id' => 'getId', - 'name' => 'getName', - 'subject' => 'getSubject', - 'type' => 'getType', - 'status' => 'getStatus', - 'scheduledAt' => 'getScheduledAt', - 'abTesting' => 'getAbTesting', - 'subjectA' => 'getSubjectA', - 'subjectB' => 'getSubjectB', - 'splitRule' => 'getSplitRule', - 'winnerCriteria' => 'getWinnerCriteria', - 'winnerDelay' => 'getWinnerDelay', - 'sendAtBestTime' => 'getSendAtBestTime', - 'testSent' => 'getTestSent', - 'header' => 'getHeader', - 'footer' => 'getFooter', - 'sender' => 'getSender', - 'replyTo' => 'getReplyTo', - 'toField' => 'getToField', - 'htmlContent' => 'getHtmlContent', - 'shareLink' => 'getShareLink', - 'tag' => 'getTag', - 'createdAt' => 'getCreatedAt', - 'modifiedAt' => 'getModifiedAt', - 'inlineImageActivation' => 'getInlineImageActivation', - 'mirrorActive' => 'getMirrorActive', - 'recurring' => 'getRecurring', - 'sentDate' => 'getSentDate', - 'returnBounce' => 'getReturnBounce', 'recipients' => 'getRecipients', 'statistics' => 'getStatistics' ]; + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -269,7 +128,7 @@ public static function swaggerFormats() */ public static function attributeMap() { - return self::$attributeMap; + return parent::attributeMap() + self::$attributeMap; } /** @@ -279,7 +138,7 @@ public static function attributeMap() */ public static function setters() { - return self::$setters; + return parent::setters() + self::$setters; } /** @@ -289,7 +148,7 @@ public static function setters() */ public static function getters() { - return self::$getters; + return parent::getters() + self::$getters; } /** @@ -302,54 +161,10 @@ public function getModelName() return self::$swaggerModelName; } - const TYPE_CLASSIC = 'classic'; - const TYPE_TRIGGER = 'trigger'; - const STATUS_DRAFT = 'draft'; - const STATUS_SENT = 'sent'; - const STATUS_ARCHIVE = 'archive'; - const STATUS_QUEUED = 'queued'; - const STATUS_SUSPENDED = 'suspended'; - const STATUS_IN_PROCESS = 'in_process'; - - - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTypeAllowableValues() - { - return [ - self::TYPE_CLASSIC, - self::TYPE_TRIGGER, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getStatusAllowableValues() - { - return [ - self::STATUS_DRAFT, - self::STATUS_SENT, - self::STATUS_ARCHIVE, - self::STATUS_QUEUED, - self::STATUS_SUSPENDED, - self::STATUS_IN_PROCESS, - ]; - } + + - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; /** * Constructor @@ -359,38 +174,12 @@ public function getStatusAllowableValues() */ public function __construct(array $data = null) { - $this->container['id'] = isset($data['id']) ? $data['id'] : null; - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - $this->container['subject'] = isset($data['subject']) ? $data['subject'] : null; - $this->container['type'] = isset($data['type']) ? $data['type'] : null; - $this->container['status'] = isset($data['status']) ? $data['status'] : null; - $this->container['scheduledAt'] = isset($data['scheduledAt']) ? $data['scheduledAt'] : null; - $this->container['abTesting'] = isset($data['abTesting']) ? $data['abTesting'] : null; - $this->container['subjectA'] = isset($data['subjectA']) ? $data['subjectA'] : null; - $this->container['subjectB'] = isset($data['subjectB']) ? $data['subjectB'] : null; - $this->container['splitRule'] = isset($data['splitRule']) ? $data['splitRule'] : null; - $this->container['winnerCriteria'] = isset($data['winnerCriteria']) ? $data['winnerCriteria'] : null; - $this->container['winnerDelay'] = isset($data['winnerDelay']) ? $data['winnerDelay'] : null; - $this->container['sendAtBestTime'] = isset($data['sendAtBestTime']) ? $data['sendAtBestTime'] : null; - $this->container['testSent'] = isset($data['testSent']) ? $data['testSent'] : null; - $this->container['header'] = isset($data['header']) ? $data['header'] : null; - $this->container['footer'] = isset($data['footer']) ? $data['footer'] : null; - $this->container['sender'] = isset($data['sender']) ? $data['sender'] : null; - $this->container['replyTo'] = isset($data['replyTo']) ? $data['replyTo'] : null; - $this->container['toField'] = isset($data['toField']) ? $data['toField'] : null; - $this->container['htmlContent'] = isset($data['htmlContent']) ? $data['htmlContent'] : null; - $this->container['shareLink'] = isset($data['shareLink']) ? $data['shareLink'] : null; - $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; - $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; - $this->container['modifiedAt'] = isset($data['modifiedAt']) ? $data['modifiedAt'] : null; - $this->container['inlineImageActivation'] = isset($data['inlineImageActivation']) ? $data['inlineImageActivation'] : null; - $this->container['mirrorActive'] = isset($data['mirrorActive']) ? $data['mirrorActive'] : null; - $this->container['recurring'] = isset($data['recurring']) ? $data['recurring'] : null; - $this->container['sentDate'] = isset($data['sentDate']) ? $data['sentDate'] : null; - $this->container['returnBounce'] = isset($data['returnBounce']) ? $data['returnBounce'] : null; + parent::__construct($data); + $this->container['recipients'] = isset($data['recipients']) ? $data['recipients'] : null; $this->container['statistics'] = isset($data['statistics']) ? $data['statistics'] : null; } + /** * Show all the invalid properties with reasons. * @@ -398,60 +187,8 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ($this->container['type'] === null) { - $invalidProperties[] = "'type' can't be null"; - } - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value for 'type', must be one of '%s'", - implode("', '", $allowedValues) - ); - } + $invalidProperties = parent::listInvalidProperties(); - if ($this->container['status'] === null) { - $invalidProperties[] = "'status' can't be null"; - } - $allowedValues = $this->getStatusAllowableValues(); - if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value for 'status', must be one of '%s'", - implode("', '", $allowedValues) - ); - } - - if ($this->container['testSent'] === null) { - $invalidProperties[] = "'testSent' can't be null"; - } - if ($this->container['header'] === null) { - $invalidProperties[] = "'header' can't be null"; - } - if ($this->container['footer'] === null) { - $invalidProperties[] = "'footer' can't be null"; - } - if ($this->container['sender'] === null) { - $invalidProperties[] = "'sender' can't be null"; - } - if ($this->container['replyTo'] === null) { - $invalidProperties[] = "'replyTo' can't be null"; - } - if ($this->container['htmlContent'] === null) { - $invalidProperties[] = "'htmlContent' can't be null"; - } - if ($this->container['createdAt'] === null) { - $invalidProperties[] = "'createdAt' can't be null"; - } - if ($this->container['modifiedAt'] === null) { - $invalidProperties[] = "'modifiedAt' can't be null"; - } if ($this->container['recipients'] === null) { $invalidProperties[] = "'recipients' can't be null"; } @@ -460,6 +197,7 @@ public function listInvalidProperties() } return $invalidProperties; } + /** * Validate all the properties in the model * return true if all passed @@ -473,823 +211,125 @@ public function valid() /** - * Gets id + * Gets recipients * - * @return int + * @return \SendinBlue\Client\Model\GetSmsCampaignRecipients */ - public function getId() + public function getRecipients() { - return $this->container['id']; + return $this->container['recipients']; } /** - * Sets id + * Sets recipients * - * @param int $id ID of the campaign + * @param \SendinBlue\Client\Model\GetSmsCampaignRecipients $recipients recipients * * @return $this */ - public function setId($id) + public function setRecipients($recipients) { - $this->container['id'] = $id; + $this->container['recipients'] = $recipients; return $this; } /** - * Gets name + * Gets statistics * - * @return string + * @return \SendinBlue\Client\Model\GetSmsCampaignRecipients */ - public function getName() + public function getStatistics() { - return $this->container['name']; + return $this->container['statistics']; } /** - * Sets name + * Sets statistics * - * @param string $name Name of the campaign + * @param \SendinBlue\Client\Model\GetSmsCampaignRecipients $statistics statistics * * @return $this */ - public function setName($name) + public function setStatistics($statistics) { - $this->container['name'] = $name; + $this->container['statistics'] = $statistics; return $this; } - - /** - * Gets subject - * - * @return string - */ - public function getSubject() - { - return $this->container['subject']; - } - /** - * Sets subject - * - * @param string $subject Subject of the campaign. Only available if `abTesting` flag of the campaign is `false` + * Returns true if offset exists. False otherwise. * - * @return $this - */ - public function setSubject($subject) - { - $this->container['subject'] = $subject; - - return $this; - } - - /** - * Gets type + * @param integer $offset Offset * - * @return string + * @return boolean */ - public function getType() + #[\ReturnTypeWillChange] + public function offsetExists($offset) { - return $this->container['type']; + return isset($this->container[$offset]); } /** - * Sets type - * - * @param string $type Type of campaign + * Gets offset. * - * @return $this - */ - public function setType($type) - { - $allowedValues = $this->getTypeAllowableValues(); - if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value for 'type', must be one of '%s'", - implode("', '", $allowedValues) - ) - ); - } - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets status + * @param integer $offset Offset * - * @return string + * @return mixed */ - public function getStatus() + #[\ReturnTypeWillChange] + public function offsetGet($offset) { - return $this->container['status']; + return isset($this->container[$offset]) ? $this->container[$offset] : null; } /** - * Sets status + * Sets value based on offset. * - * @param string $status Status of the campaign + * @param integer $offset Offset + * @param mixed $value Value to be set * - * @return $this + * @return void */ - public function setStatus($status) + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) { - $allowedValues = $this->getStatusAllowableValues(); - if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value for 'status', must be one of '%s'", - implode("', '", $allowedValues) - ) - ); + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; } - $this->container['status'] = $status; - - return $this; - } - - /** - * Gets scheduledAt - * - * @return string - */ - public function getScheduledAt() - { - return $this->container['scheduledAt']; - } - - /** - * Sets scheduledAt - * - * @param string $scheduledAt UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ) - * - * @return $this - */ - public function setScheduledAt($scheduledAt) - { - $this->container['scheduledAt'] = $scheduledAt; - - return $this; } /** - * Gets abTesting - * - * @return bool - */ - public function getAbTesting() - { - return $this->container['abTesting']; - } - - /** - * Sets abTesting - * - * @param bool $abTesting Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled. - * - * @return $this - */ - public function setAbTesting($abTesting) - { - $this->container['abTesting'] = $abTesting; - - return $this; - } - - /** - * Gets subjectA - * - * @return string - */ - public function getSubjectA() - { - return $this->container['subjectA']; - } - - /** - * Sets subjectA - * - * @param string $subjectA Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` - * - * @return $this - */ - public function setSubjectA($subjectA) - { - $this->container['subjectA'] = $subjectA; - - return $this; - } - - /** - * Gets subjectB - * - * @return string - */ - public function getSubjectB() - { - return $this->container['subjectB']; - } - - /** - * Sets subjectB - * - * @param string $subjectB Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` - * - * @return $this - */ - public function setSubjectB($subjectB) - { - $this->container['subjectB'] = $subjectB; - - return $this; - } - - /** - * Gets splitRule - * - * @return int - */ - public function getSplitRule() - { - return $this->container['splitRule']; - } - - /** - * Sets splitRule + * Unsets offset. * - * @param int $splitRule The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true` + * @param integer $offset Offset * - * @return $this + * @return void */ - public function setSplitRule($splitRule) + #[\ReturnTypeWillChange] + public function offsetUnset($offset) { - $this->container['splitRule'] = $splitRule; - - return $this; + unset($this->container[$offset]); } /** - * Gets winnerCriteria + * Gets the string presentation of the object * * @return string */ - public function getWinnerCriteria() - { - return $this->container['winnerCriteria']; - } - - /** - * Sets winnerCriteria - * - * @param string $winnerCriteria Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true` - * - * @return $this - */ - public function setWinnerCriteria($winnerCriteria) - { - $this->container['winnerCriteria'] = $winnerCriteria; - - return $this; - } - - /** - * Gets winnerDelay - * - * @return int - */ - public function getWinnerDelay() - { - return $this->container['winnerDelay']; - } - - /** - * Sets winnerDelay - * - * @param int $winnerDelay The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true` - * - * @return $this - */ - public function setWinnerDelay($winnerDelay) - { - $this->container['winnerDelay'] = $winnerDelay; - - return $this; - } - - /** - * Gets sendAtBestTime - * - * @return bool - */ - public function getSendAtBestTime() - { - return $this->container['sendAtBestTime']; - } - - /** - * Sets sendAtBestTime - * - * @param bool $sendAtBestTime It is true if you have chosen to send your campaign at best time, otherwise it is false - * - * @return $this - */ - public function setSendAtBestTime($sendAtBestTime) + public function __toString() { - $this->container['sendAtBestTime'] = $sendAtBestTime; - - return $this; - } + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } - /** - * Gets testSent - * - * @return bool - */ - public function getTestSent() - { - return $this->container['testSent']; + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } +} - /** - * Sets testSent - * - * @param bool $testSent Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) - * - * @return $this - */ - public function setTestSent($testSent) - { - $this->container['testSent'] = $testSent; - return $this; - } - - /** - * Gets header - * - * @return string - */ - public function getHeader() - { - return $this->container['header']; - } - - /** - * Sets header - * - * @param string $header Header of the campaign - * - * @return $this - */ - public function setHeader($header) - { - $this->container['header'] = $header; - - return $this; - } - - /** - * Gets footer - * - * @return string - */ - public function getFooter() - { - return $this->container['footer']; - } - - /** - * Sets footer - * - * @param string $footer Footer of the campaign - * - * @return $this - */ - public function setFooter($footer) - { - $this->container['footer'] = $footer; - - return $this; - } - - /** - * Gets sender - * - * @return \SendinBlue\Client\Model\GetExtendedCampaignOverviewSender - */ - public function getSender() - { - return $this->container['sender']; - } - - /** - * Sets sender - * - * @param \SendinBlue\Client\Model\GetExtendedCampaignOverviewSender $sender sender - * - * @return $this - */ - public function setSender($sender) - { - $this->container['sender'] = $sender; - - return $this; - } - - /** - * Gets replyTo - * - * @return string - */ - public function getReplyTo() - { - return $this->container['replyTo']; - } - - /** - * Sets replyTo - * - * @param string $replyTo Email defined as the \"Reply to\" of the campaign - * - * @return $this - */ - public function setReplyTo($replyTo) - { - $this->container['replyTo'] = $replyTo; - - return $this; - } - - /** - * Gets toField - * - * @return string - */ - public function getToField() - { - return $this->container['toField']; - } - - /** - * Sets toField - * - * @param string $toField Customisation of the \"to\" field of the campaign - * - * @return $this - */ - public function setToField($toField) - { - $this->container['toField'] = $toField; - - return $this; - } - - /** - * Gets htmlContent - * - * @return string - */ - public function getHtmlContent() - { - return $this->container['htmlContent']; - } - - /** - * Sets htmlContent - * - * @param string $htmlContent HTML content of the campaign - * - * @return $this - */ - public function setHtmlContent($htmlContent) - { - $this->container['htmlContent'] = $htmlContent; - - return $this; - } - - /** - * Gets shareLink - * - * @return string - */ - public function getShareLink() - { - return $this->container['shareLink']; - } - - /** - * Sets shareLink - * - * @param string $shareLink Link to share the campaign on social medias - * - * @return $this - */ - public function setShareLink($shareLink) - { - $this->container['shareLink'] = $shareLink; - - return $this; - } - - /** - * Gets tag - * - * @return string - */ - public function getTag() - { - return $this->container['tag']; - } - - /** - * Sets tag - * - * @param string $tag Tag of the campaign - * - * @return $this - */ - public function setTag($tag) - { - $this->container['tag'] = $tag; - - return $this; - } - - /** - * Gets createdAt - * - * @return string - */ - public function getCreatedAt() - { - return $this->container['createdAt']; - } - - /** - * Sets createdAt - * - * @param string $createdAt Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) - * - * @return $this - */ - public function setCreatedAt($createdAt) - { - $this->container['createdAt'] = $createdAt; - - return $this; - } - - /** - * Gets modifiedAt - * - * @return string - */ - public function getModifiedAt() - { - return $this->container['modifiedAt']; - } - - /** - * Sets modifiedAt - * - * @param string $modifiedAt UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) - * - * @return $this - */ - public function setModifiedAt($modifiedAt) - { - $this->container['modifiedAt'] = $modifiedAt; - - return $this; - } - - /** - * Gets inlineImageActivation - * - * @return bool - */ - public function getInlineImageActivation() - { - return $this->container['inlineImageActivation']; - } - - /** - * Sets inlineImageActivation - * - * @param bool $inlineImageActivation Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. - * - * @return $this - */ - public function setInlineImageActivation($inlineImageActivation) - { - $this->container['inlineImageActivation'] = $inlineImageActivation; - - return $this; - } - - /** - * Gets mirrorActive - * - * @return bool - */ - public function getMirrorActive() - { - return $this->container['mirrorActive']; - } - - /** - * Sets mirrorActive - * - * @param bool $mirrorActive Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign - * - * @return $this - */ - public function setMirrorActive($mirrorActive) - { - $this->container['mirrorActive'] = $mirrorActive; - - return $this; - } - - /** - * Gets recurring - * - * @return bool - */ - public function getRecurring() - { - return $this->container['recurring']; - } - - /** - * Sets recurring - * - * @param bool $recurring FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times - * - * @return $this - */ - public function setRecurring($recurring) - { - $this->container['recurring'] = $recurring; - - return $this; - } - - /** - * Gets sentDate - * - * @return string - */ - public function getSentDate() - { - return $this->container['sentDate']; - } - - /** - * Sets sentDate - * - * @param string $sentDate Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent' - * - * @return $this - */ - public function setSentDate($sentDate) - { - $this->container['sentDate'] = $sentDate; - - return $this; - } - - /** - * Gets returnBounce - * - * @return int - */ - public function getReturnBounce() - { - return $this->container['returnBounce']; - } - - /** - * Sets returnBounce - * - * @param int $returnBounce Total number of non-delivered campaigns for a particular campaign id. - * - * @return $this - */ - public function setReturnBounce($returnBounce) - { - $this->container['returnBounce'] = $returnBounce; - - return $this; - } - - /** - * Gets recipients - * - * @return object - */ - public function getRecipients() - { - return $this->container['recipients']; - } - /** - * Sets recipients - * - * @param object $recipients recipients - * - * @return $this - */ - public function setRecipients($recipients) - { - $this->container['recipients'] = $recipients; - return $this; - } - /** - * Gets statistics - * - * @return object - */ - public function getStatistics() - { - return $this->container['statistics']; - } - /** - * Sets statistics - * - * @param object $statistics statistics - * - * @return $this - */ - public function setStatistics($statistics) - { - $this->container['statistics'] = $statistics; - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} \ No newline at end of file diff --git a/lib/Model/GetEmailCampaigns.php b/lib/Model/GetEmailCampaigns.php index 81dc5888..c20a2b45 100644 --- a/lib/Model/GetEmailCampaigns.php +++ b/lib/Model/GetEmailCampaigns.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -195,6 +195,9 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['count'] === null) { + $invalidProperties[] = "'count' can't be null"; + } return $invalidProperties; } @@ -264,6 +267,7 @@ public function setCount($count) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -276,6 +280,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -289,6 +294,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -305,6 +311,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetEmailEventReport.php b/lib/Model/GetEmailEventReport.php index ef5826f5..b1e8e5b7 100644 --- a/lib/Model/GetEmailEventReport.php +++ b/lib/Model/GetEmailEventReport.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -234,6 +234,7 @@ public function setEvents($events) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -246,6 +247,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -259,6 +261,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -275,6 +278,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetEmailEventReportEvents.php b/lib/Model/GetEmailEventReportEvents.php index fb676b2d..32563525 100644 --- a/lib/Model/GetEmailEventReportEvents.php +++ b/lib/Model/GetEmailEventReportEvents.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -58,16 +58,15 @@ class GetEmailEventReportEvents implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'email' => 'string', - 'date' => 'string', + 'date' => '\DateTime', 'subject' => 'string', - 'messageId' => 'string', + 'message_id' => 'string', 'event' => 'string', 'reason' => 'string', 'tag' => 'string', 'ip' => 'string', 'link' => 'string', - 'from' => 'string', - 'templateId' => 'int' + 'from' => 'string' ]; /** @@ -77,16 +76,15 @@ class GetEmailEventReportEvents implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'email' => 'email', - 'date' => null, + 'date' => 'date-time', 'subject' => null, - 'messageId' => null, + 'message_id' => null, 'event' => null, 'reason' => null, 'tag' => null, 'ip' => null, 'link' => null, - 'from' => 'email', - 'templateId' => 'int64' + 'from' => 'email' ]; /** @@ -119,14 +117,13 @@ public static function swaggerFormats() 'email' => 'email', 'date' => 'date', 'subject' => 'subject', - 'messageId' => 'messageId', + 'message_id' => 'messageId', 'event' => 'event', 'reason' => 'reason', 'tag' => 'tag', 'ip' => 'ip', 'link' => 'link', - 'from' => 'from', - 'templateId' => 'templateId' + 'from' => 'from' ]; /** @@ -138,14 +135,13 @@ public static function swaggerFormats() 'email' => 'setEmail', 'date' => 'setDate', 'subject' => 'setSubject', - 'messageId' => 'setMessageId', + 'message_id' => 'setMessageId', 'event' => 'setEvent', 'reason' => 'setReason', 'tag' => 'setTag', 'ip' => 'setIp', 'link' => 'setLink', - 'from' => 'setFrom', - 'templateId' => 'setTemplateId' + 'from' => 'setFrom' ]; /** @@ -157,14 +153,13 @@ public static function swaggerFormats() 'email' => 'getEmail', 'date' => 'getDate', 'subject' => 'getSubject', - 'messageId' => 'getMessageId', + 'message_id' => 'getMessageId', 'event' => 'getEvent', 'reason' => 'getReason', 'tag' => 'getTag', 'ip' => 'getIp', 'link' => 'getLink', - 'from' => 'getFrom', - 'templateId' => 'getTemplateId' + 'from' => 'getFrom' ]; /** @@ -220,8 +215,6 @@ public function getModelName() const EVENT_DEFERRED = 'deferred'; const EVENT_BLOCKED = 'blocked'; const EVENT_UNSUBSCRIBED = 'unsubscribed'; - const EVENT_ERROR = 'error'; - const EVENT_LOADED_BY_PROXY = 'loadedByProxy'; @@ -245,8 +238,6 @@ public function getEventAllowableValues() self::EVENT_DEFERRED, self::EVENT_BLOCKED, self::EVENT_UNSUBSCRIBED, - self::EVENT_ERROR, - self::EVENT_LOADED_BY_PROXY, ]; } @@ -269,14 +260,13 @@ public function __construct(array $data = null) $this->container['email'] = isset($data['email']) ? $data['email'] : null; $this->container['date'] = isset($data['date']) ? $data['date'] : null; $this->container['subject'] = isset($data['subject']) ? $data['subject'] : null; - $this->container['messageId'] = isset($data['messageId']) ? $data['messageId'] : null; + $this->container['message_id'] = isset($data['message_id']) ? $data['message_id'] : null; $this->container['event'] = isset($data['event']) ? $data['event'] : null; $this->container['reason'] = isset($data['reason']) ? $data['reason'] : null; $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; $this->container['link'] = isset($data['link']) ? $data['link'] : null; $this->container['from'] = isset($data['from']) ? $data['from'] : null; - $this->container['templateId'] = isset($data['templateId']) ? $data['templateId'] : null; } /** @@ -294,8 +284,8 @@ public function listInvalidProperties() if ($this->container['date'] === null) { $invalidProperties[] = "'date' can't be null"; } - if ($this->container['messageId'] === null) { - $invalidProperties[] = "'messageId' can't be null"; + if ($this->container['message_id'] === null) { + $invalidProperties[] = "'message_id' can't be null"; } if ($this->container['event'] === null) { $invalidProperties[] = "'event' can't be null"; @@ -350,7 +340,7 @@ public function setEmail($email) /** * Gets date * - * @return string + * @return \DateTime */ public function getDate() { @@ -360,7 +350,7 @@ public function getDate() /** * Sets date * - * @param string $date UTC date-time on which the event has been generated + * @param \DateTime $date UTC date-time on which the event has been generated * * @return $this */ @@ -396,25 +386,25 @@ public function setSubject($subject) } /** - * Gets messageId + * Gets message_id * * @return string */ public function getMessageId() { - return $this->container['messageId']; + return $this->container['message_id']; } /** - * Sets messageId + * Sets message_id * - * @param string $messageId Message ID which generated the event + * @param string $message_id Message ID which generated the event * * @return $this */ - public function setMessageId($messageId) + public function setMessageId($message_id) { - $this->container['messageId'] = $messageId; + $this->container['message_id'] = $message_id; return $this; } @@ -571,30 +561,6 @@ public function setFrom($from) return $this; } - - /** - * Gets templateId - * - * @return int - */ - public function getTemplateId() - { - return $this->container['templateId']; - } - - /** - * Sets templateId - * - * @param int $templateId ID of the template (only available if the email is template based) - * - * @return $this - */ - public function setTemplateId($templateId) - { - $this->container['templateId'] = $templateId; - - return $this; - } /** * Returns true if offset exists. False otherwise. * @@ -602,6 +568,7 @@ public function setTemplateId($templateId) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -614,6 +581,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -627,6 +595,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -643,6 +612,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetExtendedCampaignOverview.php b/lib/Model/GetExtendedCampaignOverview.php index aa168312..c366995d 100644 --- a/lib/Model/GetExtendedCampaignOverview.php +++ b/lib/Model/GetExtendedCampaignOverview.php @@ -9,6 +9,7 @@ * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ + /** * SendinBlue API * @@ -17,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -27,8 +28,6 @@ */ namespace SendinBlue\Client\Model; - -use \ArrayAccess; use \SendinBlue\Client\ObjectSerializer; /** @@ -39,7 +38,7 @@ * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class GetExtendedCampaignOverview implements ModelInterface, ArrayAccess +class GetExtendedCampaignOverview extends GetCampaignOverview { const DISCRIMINATOR = null; @@ -49,78 +48,55 @@ class GetExtendedCampaignOverview implements ModelInterface, ArrayAccess * @var string */ protected static $swaggerModelName = 'getExtendedCampaignOverview'; + /** * Array of property to type mappings. Used for (de)serialization * * @var string[] */ protected static $swaggerTypes = [ - 'id' => 'int', - 'name' => 'string', - 'subject' => 'string', - 'type' => 'string', - 'status' => 'string', - 'scheduledAt' => 'string', - 'abTesting' => 'bool', - 'subjectA' => 'string', - 'subjectB' => 'string', - 'splitRule' => 'int', - 'winnerCriteria' => 'string', - 'winnerDelay' => 'int', - 'sendAtBestTime' => 'bool', - 'testSent' => 'bool', + 'test_sent' => 'bool', 'header' => 'string', 'footer' => 'string', 'sender' => '\SendinBlue\Client\Model\GetExtendedCampaignOverviewSender', - 'replyTo' => 'string', - 'toField' => 'string', - 'htmlContent' => 'string', - 'shareLink' => 'string', + 'reply_to' => 'string', + 'to_field' => 'string', + 'html_content' => 'string', + 'share_link' => 'string', 'tag' => 'string', - 'createdAt' => 'string', - 'modifiedAt' => 'string', - 'inlineImageActivation' => 'bool', - 'mirrorActive' => 'bool', + 'created_at' => '\DateTime', + 'modified_at' => '\DateTime', + 'inline_image_activation' => 'bool', + 'mirror_active' => 'bool', 'recurring' => 'bool', - 'sentDate' => 'string', - 'returnBounce' => 'int' + 'sent_date' => '\DateTime', + 'return_bounce' => 'int' ]; + /** * Array of property to format mappings. Used for (de)serialization * * @var string[] */ protected static $swaggerFormats = [ - 'id' => 'int64', - 'name' => null, - 'subject' => null, - 'type' => null, - 'status' => null, - 'scheduledAt' => null, - 'abTesting' => null, - 'subjectA' => null, - 'subjectB' => null, - 'splitRule' => null, - 'winnerCriteria' => null, - 'winnerDelay' => null, - 'sendAtBestTime' => null, - 'testSent' => null, + 'test_sent' => null, 'header' => null, 'footer' => null, 'sender' => null, - 'replyTo' => 'email', - 'toField' => null, - 'htmlContent' => null, - 'shareLink' => 'url', + 'reply_to' => 'email', + 'to_field' => null, + 'html_content' => null, + 'share_link' => 'url', 'tag' => null, - 'createdAt' => null, - 'modifiedAt' => null, - 'inlineImageActivation' => null, - 'mirrorActive' => null, + 'created_at' => 'date-time', + 'modified_at' => 'date-time', + 'inline_image_activation' => null, + 'mirror_active' => null, 'recurring' => null, - 'sentDate' => null, - 'returnBounce' => 'int64' + 'sent_date' => 'date-time', + 'return_bounce' => 'int64' ]; + /** * Array of property to type mappings. Used for (de)serialization * @@ -128,7 +104,7 @@ class GetExtendedCampaignOverview implements ModelInterface, ArrayAccess */ public static function swaggerTypes() { - return self::$swaggerTypes; + return self::$swaggerTypes + parent::swaggerTypes(); } /** @@ -138,7 +114,7 @@ public static function swaggerTypes() */ public static function swaggerFormats() { - return self::$swaggerFormats; + return self::$swaggerFormats + parent::swaggerFormats(); } /** @@ -148,108 +124,72 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', - 'name' => 'name', - 'subject' => 'subject', - 'type' => 'type', - 'status' => 'status', - 'scheduledAt' => 'scheduledAt', - 'abTesting' => 'abTesting', - 'subjectA' => 'subjectA', - 'subjectB' => 'subjectB', - 'splitRule' => 'splitRule', - 'winnerCriteria' => 'winnerCriteria', - 'winnerDelay' => 'winnerDelay', - 'sendAtBestTime' => 'sendAtBestTime', - 'testSent' => 'testSent', + 'test_sent' => 'testSent', 'header' => 'header', 'footer' => 'footer', 'sender' => 'sender', - 'replyTo' => 'replyTo', - 'toField' => 'toField', - 'htmlContent' => 'htmlContent', - 'shareLink' => 'shareLink', + 'reply_to' => 'replyTo', + 'to_field' => 'toField', + 'html_content' => 'htmlContent', + 'share_link' => 'shareLink', 'tag' => 'tag', - 'createdAt' => 'createdAt', - 'modifiedAt' => 'modifiedAt', - 'inlineImageActivation' => 'inlineImageActivation', - 'mirrorActive' => 'mirrorActive', + 'created_at' => 'createdAt', + 'modified_at' => 'modifiedAt', + 'inline_image_activation' => 'inlineImageActivation', + 'mirror_active' => 'mirrorActive', 'recurring' => 'recurring', - 'sentDate' => 'sentDate', - 'returnBounce' => 'returnBounce' + 'sent_date' => 'sentDate', + 'return_bounce' => 'returnBounce' ]; + /** * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static $setters = [ - 'id' => 'setId', - 'name' => 'setName', - 'subject' => 'setSubject', - 'type' => 'setType', - 'status' => 'setStatus', - 'scheduledAt' => 'setScheduledAt', - 'abTesting' => 'setAbTesting', - 'subjectA' => 'setSubjectA', - 'subjectB' => 'setSubjectB', - 'splitRule' => 'setSplitRule', - 'winnerCriteria' => 'setWinnerCriteria', - 'winnerDelay' => 'setWinnerDelay', - 'sendAtBestTime' => 'setSendAtBestTime', - 'testSent' => 'setTestSent', + 'test_sent' => 'setTestSent', 'header' => 'setHeader', 'footer' => 'setFooter', 'sender' => 'setSender', - 'replyTo' => 'setReplyTo', - 'toField' => 'setToField', - 'htmlContent' => 'setHtmlContent', - 'shareLink' => 'setShareLink', + 'reply_to' => 'setReplyTo', + 'to_field' => 'setToField', + 'html_content' => 'setHtmlContent', + 'share_link' => 'setShareLink', 'tag' => 'setTag', - 'createdAt' => 'setCreatedAt', - 'modifiedAt' => 'setModifiedAt', - 'inlineImageActivation' => 'setInlineImageActivation', - 'mirrorActive' => 'setMirrorActive', + 'created_at' => 'setCreatedAt', + 'modified_at' => 'setModifiedAt', + 'inline_image_activation' => 'setInlineImageActivation', + 'mirror_active' => 'setMirrorActive', 'recurring' => 'setRecurring', - 'sentDate' => 'setSentDate', - 'returnBounce' => 'setReturnBounce' + 'sent_date' => 'setSentDate', + 'return_bounce' => 'setReturnBounce' ]; + /** * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static $getters = [ - 'id' => 'getId', - 'name' => 'getName', - 'subject' => 'getSubject', - 'type' => 'getType', - 'status' => 'getStatus', - 'scheduledAt' => 'getScheduledAt', - 'abTesting' => 'getAbTesting', - 'subjectA' => 'getSubjectA', - 'subjectB' => 'getSubjectB', - 'splitRule' => 'getSplitRule', - 'winnerCriteria' => 'getWinnerCriteria', - 'winnerDelay' => 'getWinnerDelay', - 'sendAtBestTime' => 'getSendAtBestTime', - 'testSent' => 'getTestSent', + 'test_sent' => 'getTestSent', 'header' => 'getHeader', 'footer' => 'getFooter', 'sender' => 'getSender', - 'replyTo' => 'getReplyTo', - 'toField' => 'getToField', - 'htmlContent' => 'getHtmlContent', - 'shareLink' => 'getShareLink', + 'reply_to' => 'getReplyTo', + 'to_field' => 'getToField', + 'html_content' => 'getHtmlContent', + 'share_link' => 'getShareLink', 'tag' => 'getTag', - 'createdAt' => 'getCreatedAt', - 'modifiedAt' => 'getModifiedAt', - 'inlineImageActivation' => 'getInlineImageActivation', - 'mirrorActive' => 'getMirrorActive', + 'created_at' => 'getCreatedAt', + 'modified_at' => 'getModifiedAt', + 'inline_image_activation' => 'getInlineImageActivation', + 'mirror_active' => 'getMirrorActive', 'recurring' => 'getRecurring', - 'sentDate' => 'getSentDate', - 'returnBounce' => 'getReturnBounce' + 'sent_date' => 'getSentDate', + 'return_bounce' => 'getReturnBounce' ]; + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -258,7 +198,7 @@ public static function swaggerFormats() */ public static function attributeMap() { - return self::$attributeMap; + return parent::attributeMap() + self::$attributeMap; } /** @@ -268,7 +208,7 @@ public static function attributeMap() */ public static function setters() { - return self::$setters; + return parent::setters() + self::$setters; } /** @@ -278,7 +218,7 @@ public static function setters() */ public static function getters() { - return self::$getters; + return parent::getters() + self::$getters; } /** @@ -291,54 +231,10 @@ public function getModelName() return self::$swaggerModelName; } - const TYPE_CLASSIC = 'classic'; - const TYPE_TRIGGER = 'trigger'; - const STATUS_DRAFT = 'draft'; - const STATUS_SENT = 'sent'; - const STATUS_ARCHIVE = 'archive'; - const STATUS_QUEUED = 'queued'; - const STATUS_SUSPENDED = 'suspended'; - const STATUS_IN_PROCESS = 'in_process'; - - - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTypeAllowableValues() - { - return [ - self::TYPE_CLASSIC, - self::TYPE_TRIGGER, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getStatusAllowableValues() - { - return [ - self::STATUS_DRAFT, - self::STATUS_SENT, - self::STATUS_ARCHIVE, - self::STATUS_QUEUED, - self::STATUS_SUSPENDED, - self::STATUS_IN_PROCESS, - ]; - } + + - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; /** * Constructor @@ -348,36 +244,26 @@ public function getStatusAllowableValues() */ public function __construct(array $data = null) { - $this->container['id'] = isset($data['id']) ? $data['id'] : null; - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - $this->container['subject'] = isset($data['subject']) ? $data['subject'] : null; - $this->container['type'] = isset($data['type']) ? $data['type'] : null; - $this->container['status'] = isset($data['status']) ? $data['status'] : null; - $this->container['scheduledAt'] = isset($data['scheduledAt']) ? $data['scheduledAt'] : null; - $this->container['abTesting'] = isset($data['abTesting']) ? $data['abTesting'] : null; - $this->container['subjectA'] = isset($data['subjectA']) ? $data['subjectA'] : null; - $this->container['subjectB'] = isset($data['subjectB']) ? $data['subjectB'] : null; - $this->container['splitRule'] = isset($data['splitRule']) ? $data['splitRule'] : null; - $this->container['winnerCriteria'] = isset($data['winnerCriteria']) ? $data['winnerCriteria'] : null; - $this->container['winnerDelay'] = isset($data['winnerDelay']) ? $data['winnerDelay'] : null; - $this->container['sendAtBestTime'] = isset($data['sendAtBestTime']) ? $data['sendAtBestTime'] : null; - $this->container['testSent'] = isset($data['testSent']) ? $data['testSent'] : null; + parent::__construct($data); + + $this->container['test_sent'] = isset($data['test_sent']) ? $data['test_sent'] : null; $this->container['header'] = isset($data['header']) ? $data['header'] : null; $this->container['footer'] = isset($data['footer']) ? $data['footer'] : null; $this->container['sender'] = isset($data['sender']) ? $data['sender'] : null; - $this->container['replyTo'] = isset($data['replyTo']) ? $data['replyTo'] : null; - $this->container['toField'] = isset($data['toField']) ? $data['toField'] : null; - $this->container['htmlContent'] = isset($data['htmlContent']) ? $data['htmlContent'] : null; - $this->container['shareLink'] = isset($data['shareLink']) ? $data['shareLink'] : null; + $this->container['reply_to'] = isset($data['reply_to']) ? $data['reply_to'] : null; + $this->container['to_field'] = isset($data['to_field']) ? $data['to_field'] : null; + $this->container['html_content'] = isset($data['html_content']) ? $data['html_content'] : null; + $this->container['share_link'] = isset($data['share_link']) ? $data['share_link'] : null; $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; - $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; - $this->container['modifiedAt'] = isset($data['modifiedAt']) ? $data['modifiedAt'] : null; - $this->container['inlineImageActivation'] = isset($data['inlineImageActivation']) ? $data['inlineImageActivation'] : null; - $this->container['mirrorActive'] = isset($data['mirrorActive']) ? $data['mirrorActive'] : null; + $this->container['created_at'] = isset($data['created_at']) ? $data['created_at'] : null; + $this->container['modified_at'] = isset($data['modified_at']) ? $data['modified_at'] : null; + $this->container['inline_image_activation'] = isset($data['inline_image_activation']) ? $data['inline_image_activation'] : null; + $this->container['mirror_active'] = isset($data['mirror_active']) ? $data['mirror_active'] : null; $this->container['recurring'] = isset($data['recurring']) ? $data['recurring'] : null; - $this->container['sentDate'] = isset($data['sentDate']) ? $data['sentDate'] : null; - $this->container['returnBounce'] = isset($data['returnBounce']) ? $data['returnBounce'] : null; + $this->container['sent_date'] = isset($data['sent_date']) ? $data['sent_date'] : null; + $this->container['return_bounce'] = isset($data['return_bounce']) ? $data['return_bounce'] : null; } + /** * Show all the invalid properties with reasons. * @@ -385,38 +271,10 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ($this->container['type'] === null) { - $invalidProperties[] = "'type' can't be null"; - } - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value for 'type', must be one of '%s'", - implode("', '", $allowedValues) - ); - } - - if ($this->container['status'] === null) { - $invalidProperties[] = "'status' can't be null"; - } - $allowedValues = $this->getStatusAllowableValues(); - if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value for 'status', must be one of '%s'", - implode("', '", $allowedValues) - ); - } + $invalidProperties = parent::listInvalidProperties(); - if ($this->container['testSent'] === null) { - $invalidProperties[] = "'testSent' can't be null"; + if ($this->container['test_sent'] === null) { + $invalidProperties[] = "'test_sent' can't be null"; } if ($this->container['header'] === null) { $invalidProperties[] = "'header' can't be null"; @@ -427,20 +285,27 @@ public function listInvalidProperties() if ($this->container['sender'] === null) { $invalidProperties[] = "'sender' can't be null"; } - if ($this->container['replyTo'] === null) { - $invalidProperties[] = "'replyTo' can't be null"; + if ($this->container['reply_to'] === null) { + $invalidProperties[] = "'reply_to' can't be null"; + } + if ($this->container['to_field'] === null) { + $invalidProperties[] = "'to_field' can't be null"; } - if ($this->container['htmlContent'] === null) { - $invalidProperties[] = "'htmlContent' can't be null"; + if ($this->container['html_content'] === null) { + $invalidProperties[] = "'html_content' can't be null"; } - if ($this->container['createdAt'] === null) { - $invalidProperties[] = "'createdAt' can't be null"; + if ($this->container['tag'] === null) { + $invalidProperties[] = "'tag' can't be null"; } - if ($this->container['modifiedAt'] === null) { - $invalidProperties[] = "'modifiedAt' can't be null"; + if ($this->container['created_at'] === null) { + $invalidProperties[] = "'created_at' can't be null"; + } + if ($this->container['modified_at'] === null) { + $invalidProperties[] = "'modified_at' can't be null"; } return $invalidProperties; } + /** * Validate all the properties in the model * return true if all passed @@ -454,356 +319,29 @@ public function valid() /** - * Gets id - * - * @return int - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param int $id ID of the campaign - * - * @return $this - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name Name of the campaign - * - * @return $this - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets subject - * - * @return string - */ - public function getSubject() - { - return $this->container['subject']; - } - - /** - * Sets subject - * - * @param string $subject Subject of the campaign. Only available if `abTesting` flag of the campaign is `false` - * - * @return $this - */ - public function setSubject($subject) - { - $this->container['subject'] = $subject; - - return $this; - } - - /** - * Gets type - * - * @return string - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string $type Type of campaign - * - * @return $this - */ - public function setType($type) - { - $allowedValues = $this->getTypeAllowableValues(); - if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value for 'type', must be one of '%s'", - implode("', '", $allowedValues) - ) - ); - } - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets status - * - * @return string - */ - public function getStatus() - { - return $this->container['status']; - } - - /** - * Sets status - * - * @param string $status Status of the campaign - * - * @return $this - */ - public function setStatus($status) - { - $allowedValues = $this->getStatusAllowableValues(); - if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value for 'status', must be one of '%s'", - implode("', '", $allowedValues) - ) - ); - } - $this->container['status'] = $status; - - return $this; - } - - /** - * Gets scheduledAt - * - * @return string - */ - public function getScheduledAt() - { - return $this->container['scheduledAt']; - } - - /** - * Sets scheduledAt - * - * @param string $scheduledAt UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ) - * - * @return $this - */ - public function setScheduledAt($scheduledAt) - { - $this->container['scheduledAt'] = $scheduledAt; - - return $this; - } - - /** - * Gets abTesting - * - * @return bool - */ - public function getAbTesting() - { - return $this->container['abTesting']; - } - - /** - * Sets abTesting - * - * @param bool $abTesting Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled. - * - * @return $this - */ - public function setAbTesting($abTesting) - { - $this->container['abTesting'] = $abTesting; - - return $this; - } - - /** - * Gets subjectA - * - * @return string - */ - public function getSubjectA() - { - return $this->container['subjectA']; - } - - /** - * Sets subjectA - * - * @param string $subjectA Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` - * - * @return $this - */ - public function setSubjectA($subjectA) - { - $this->container['subjectA'] = $subjectA; - - return $this; - } - - /** - * Gets subjectB - * - * @return string - */ - public function getSubjectB() - { - return $this->container['subjectB']; - } - - /** - * Sets subjectB - * - * @param string $subjectB Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` - * - * @return $this - */ - public function setSubjectB($subjectB) - { - $this->container['subjectB'] = $subjectB; - - return $this; - } - - /** - * Gets splitRule - * - * @return int - */ - public function getSplitRule() - { - return $this->container['splitRule']; - } - - /** - * Sets splitRule - * - * @param int $splitRule The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true` - * - * @return $this - */ - public function setSplitRule($splitRule) - { - $this->container['splitRule'] = $splitRule; - - return $this; - } - - /** - * Gets winnerCriteria - * - * @return string - */ - public function getWinnerCriteria() - { - return $this->container['winnerCriteria']; - } - - /** - * Sets winnerCriteria - * - * @param string $winnerCriteria Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true` - * - * @return $this - */ - public function setWinnerCriteria($winnerCriteria) - { - $this->container['winnerCriteria'] = $winnerCriteria; - - return $this; - } - - /** - * Gets winnerDelay - * - * @return int - */ - public function getWinnerDelay() - { - return $this->container['winnerDelay']; - } - - /** - * Sets winnerDelay - * - * @param int $winnerDelay The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true` - * - * @return $this - */ - public function setWinnerDelay($winnerDelay) - { - $this->container['winnerDelay'] = $winnerDelay; - - return $this; - } - - /** - * Gets sendAtBestTime + * Gets test_sent * * @return bool */ - public function getSendAtBestTime() + public function getTestSent() { - return $this->container['sendAtBestTime']; + return $this->container['test_sent']; } /** - * Sets sendAtBestTime + * Sets test_sent * - * @param bool $sendAtBestTime It is true if you have chosen to send your campaign at best time, otherwise it is false + * @param bool $test_sent Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) * * @return $this */ - public function setSendAtBestTime($sendAtBestTime) + public function setTestSent($test_sent) { - $this->container['sendAtBestTime'] = $sendAtBestTime; + $this->container['test_sent'] = $test_sent; return $this; } - /** - * Gets testSent - * - * @return bool - */ - public function getTestSent() - { - return $this->container['testSent']; - } - /** - * Sets testSent - * - * @param bool $testSent Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) - * - * @return $this - */ - public function setTestSent($testSent) - { - $this->container['testSent'] = $testSent; - return $this; - } /** * Gets header * @@ -813,6 +351,7 @@ public function getHeader() { return $this->container['header']; } + /** * Sets header * @@ -823,8 +362,10 @@ public function getHeader() public function setHeader($header) { $this->container['header'] = $header; + return $this; } + /** * Gets footer * @@ -834,6 +375,7 @@ public function getFooter() { return $this->container['footer']; } + /** * Sets footer * @@ -844,8 +386,10 @@ public function getFooter() public function setFooter($footer) { $this->container['footer'] = $footer; + return $this; } + /** * Gets sender * @@ -855,6 +399,7 @@ public function getSender() { return $this->container['sender']; } + /** * Sets sender * @@ -865,92 +410,106 @@ public function getSender() public function setSender($sender) { $this->container['sender'] = $sender; + return $this; } + /** - * Gets replyTo + * Gets reply_to * * @return string */ public function getReplyTo() { - return $this->container['replyTo']; + return $this->container['reply_to']; } + /** - * Sets replyTo + * Sets reply_to * - * @param string $replyTo Email defined as the \"Reply to\" of the campaign + * @param string $reply_to Email defined as the \"Reply to\" of the campaign * * @return $this */ - public function setReplyTo($replyTo) + public function setReplyTo($reply_to) { - $this->container['replyTo'] = $replyTo; + $this->container['reply_to'] = $reply_to; + return $this; } + /** - * Gets toField + * Gets to_field * * @return string */ public function getToField() { - return $this->container['toField']; + return $this->container['to_field']; } + /** - * Sets toField + * Sets to_field * - * @param string $toField Customisation of the \"to\" field of the campaign + * @param string $to_field Customisation of the \"to\" field of the campaign * * @return $this */ - public function setToField($toField) + public function setToField($to_field) { - $this->container['toField'] = $toField; + $this->container['to_field'] = $to_field; + return $this; } + /** - * Gets htmlContent + * Gets html_content * * @return string */ public function getHtmlContent() { - return $this->container['htmlContent']; + return $this->container['html_content']; } + /** - * Sets htmlContent + * Sets html_content * - * @param string $htmlContent HTML content of the campaign + * @param string $html_content HTML content of the campaign * * @return $this */ - public function setHtmlContent($htmlContent) + public function setHtmlContent($html_content) { - $this->container['htmlContent'] = $htmlContent; + $this->container['html_content'] = $html_content; + return $this; } + /** - * Gets shareLink + * Gets share_link * * @return string */ public function getShareLink() { - return $this->container['shareLink']; + return $this->container['share_link']; } + /** - * Sets shareLink + * Sets share_link * - * @param string $shareLink Link to share the campaign on social medias + * @param string $share_link Link to share the campaign on social medias * * @return $this */ - public function setShareLink($shareLink) + public function setShareLink($share_link) { - $this->container['shareLink'] = $shareLink; + $this->container['share_link'] = $share_link; + return $this; } + /** * Gets tag * @@ -960,6 +519,7 @@ public function getTag() { return $this->container['tag']; } + /** * Sets tag * @@ -970,92 +530,106 @@ public function getTag() public function setTag($tag) { $this->container['tag'] = $tag; + return $this; } + /** - * Gets createdAt + * Gets created_at * - * @return string + * @return \DateTime */ public function getCreatedAt() { - return $this->container['createdAt']; + return $this->container['created_at']; } + /** - * Sets createdAt + * Sets created_at * - * @param string $createdAt Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @param \DateTime $created_at Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) * * @return $this */ - public function setCreatedAt($createdAt) + public function setCreatedAt($created_at) { - $this->container['createdAt'] = $createdAt; + $this->container['created_at'] = $created_at; + return $this; } + /** - * Gets modifiedAt + * Gets modified_at * - * @return string + * @return \DateTime */ public function getModifiedAt() { - return $this->container['modifiedAt']; + return $this->container['modified_at']; } + /** - * Sets modifiedAt + * Sets modified_at * - * @param string $modifiedAt UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @param \DateTime $modified_at UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) * * @return $this */ - public function setModifiedAt($modifiedAt) + public function setModifiedAt($modified_at) { - $this->container['modifiedAt'] = $modifiedAt; + $this->container['modified_at'] = $modified_at; + return $this; } + /** - * Gets inlineImageActivation + * Gets inline_image_activation * * @return bool */ public function getInlineImageActivation() { - return $this->container['inlineImageActivation']; + return $this->container['inline_image_activation']; } + /** - * Sets inlineImageActivation + * Sets inline_image_activation * - * @param bool $inlineImageActivation Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. + * @param bool $inline_image_activation Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. * * @return $this */ - public function setInlineImageActivation($inlineImageActivation) + public function setInlineImageActivation($inline_image_activation) { - $this->container['inlineImageActivation'] = $inlineImageActivation; + $this->container['inline_image_activation'] = $inline_image_activation; + return $this; } + /** - * Gets mirrorActive + * Gets mirror_active * * @return bool */ public function getMirrorActive() { - return $this->container['mirrorActive']; + return $this->container['mirror_active']; } + /** - * Sets mirrorActive + * Sets mirror_active * - * @param bool $mirrorActive Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign + * @param bool $mirror_active Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign * * @return $this */ - public function setMirrorActive($mirrorActive) + public function setMirrorActive($mirror_active) { - $this->container['mirrorActive'] = $mirrorActive; + $this->container['mirror_active'] = $mirror_active; + return $this; } + /** * Gets recurring * @@ -1065,6 +639,7 @@ public function getRecurring() { return $this->container['recurring']; } + /** * Sets recurring * @@ -1075,48 +650,55 @@ public function getRecurring() public function setRecurring($recurring) { $this->container['recurring'] = $recurring; + return $this; } + /** - * Gets sentDate + * Gets sent_date * - * @return string + * @return \DateTime */ public function getSentDate() { - return $this->container['sentDate']; + return $this->container['sent_date']; } + /** - * Sets sentDate + * Sets sent_date * - * @param string $sentDate Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent' + * @param \DateTime $sent_date Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent' * * @return $this */ - public function setSentDate($sentDate) + public function setSentDate($sent_date) { - $this->container['sentDate'] = $sentDate; + $this->container['sent_date'] = $sent_date; + return $this; } + /** - * Gets returnBounce + * Gets return_bounce * * @return int */ public function getReturnBounce() { - return $this->container['returnBounce']; + return $this->container['return_bounce']; } + /** - * Sets returnBounce + * Sets return_bounce * - * @param int $returnBounce Total number of non-delivered campaigns for a particular campaign id. + * @param int $return_bounce Total number of non-delivered campaigns for a particular campaign id. * * @return $this */ - public function setReturnBounce($returnBounce) + public function setReturnBounce($return_bounce) { - $this->container['returnBounce'] = $returnBounce; + $this->container['return_bounce'] = $return_bounce; + return $this; } /** @@ -1126,10 +708,12 @@ public function setReturnBounce($returnBounce) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); } + /** * Gets offset. * @@ -1137,10 +721,12 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; } + /** * Sets value based on offset. * @@ -1149,6 +735,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -1157,6 +744,7 @@ public function offsetSet($offset, $value) $this->container[$offset] = $value; } } + /** * Unsets offset. * @@ -1164,10 +752,12 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } + /** * Gets the string presentation of the object * @@ -1181,6 +771,9 @@ public function __toString() JSON_PRETTY_PRINT ); } + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } -} \ No newline at end of file +} + + diff --git a/lib/Model/GetExtendedCampaignOverviewSender.php b/lib/Model/GetExtendedCampaignOverviewSender.php index c3e09335..6e12c9f0 100644 --- a/lib/Model/GetExtendedCampaignOverviewSender.php +++ b/lib/Model/GetExtendedCampaignOverviewSender.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -294,6 +294,7 @@ public function setId($id) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -306,6 +307,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -319,6 +321,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -335,6 +338,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetExtendedCampaignStats.php b/lib/Model/GetExtendedCampaignStats.php index 41d0df6b..30eff762 100644 --- a/lib/Model/GetExtendedCampaignStats.php +++ b/lib/Model/GetExtendedCampaignStats.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -57,14 +57,14 @@ class GetExtendedCampaignStats implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'globalStats' => '\SendinBlue\Client\Model\GetExtendedCampaignStatsGlobalStats', - 'campaignStats' => 'object[]', - 'mirrorClick' => 'int', + 'global_stats' => '\SendinBlue\Client\Model\GetExtendedCampaignStatsGlobalStats', + 'campaign_stats' => 'object[]', + 'mirror_click' => 'int', 'remaining' => 'int', - 'linksStats' => 'object', - 'statsByDomain' => '\SendinBlue\Client\Model\GetStatsByDomain', - 'statsByDevice' => '\SendinBlue\Client\Model\GetStatsByDevice', - 'statsByBrowser' => '\SendinBlue\Client\Model\GetStatsByBrowser' + 'links_stats' => 'object', + 'stats_by_domain' => '\SendinBlue\Client\Model\GetStatsByDomain', + 'stats_by_device' => '\SendinBlue\Client\Model\GetStatsByDevice', + 'stats_by_browser' => '\SendinBlue\Client\Model\GetStatsByBrowser' ]; /** @@ -73,14 +73,14 @@ class GetExtendedCampaignStats implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'globalStats' => null, - 'campaignStats' => null, - 'mirrorClick' => 'int64', + 'global_stats' => null, + 'campaign_stats' => null, + 'mirror_click' => 'int64', 'remaining' => 'int64', - 'linksStats' => null, - 'statsByDomain' => null, - 'statsByDevice' => null, - 'statsByBrowser' => null + 'links_stats' => null, + 'stats_by_domain' => null, + 'stats_by_device' => null, + 'stats_by_browser' => null ]; /** @@ -110,14 +110,14 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'globalStats' => 'globalStats', - 'campaignStats' => 'campaignStats', - 'mirrorClick' => 'mirrorClick', + 'global_stats' => 'globalStats', + 'campaign_stats' => 'campaignStats', + 'mirror_click' => 'mirrorClick', 'remaining' => 'remaining', - 'linksStats' => 'linksStats', - 'statsByDomain' => 'statsByDomain', - 'statsByDevice' => 'statsByDevice', - 'statsByBrowser' => 'statsByBrowser' + 'links_stats' => 'linksStats', + 'stats_by_domain' => 'statsByDomain', + 'stats_by_device' => 'statsByDevice', + 'stats_by_browser' => 'statsByBrowser' ]; /** @@ -126,14 +126,14 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'globalStats' => 'setGlobalStats', - 'campaignStats' => 'setCampaignStats', - 'mirrorClick' => 'setMirrorClick', + 'global_stats' => 'setGlobalStats', + 'campaign_stats' => 'setCampaignStats', + 'mirror_click' => 'setMirrorClick', 'remaining' => 'setRemaining', - 'linksStats' => 'setLinksStats', - 'statsByDomain' => 'setStatsByDomain', - 'statsByDevice' => 'setStatsByDevice', - 'statsByBrowser' => 'setStatsByBrowser' + 'links_stats' => 'setLinksStats', + 'stats_by_domain' => 'setStatsByDomain', + 'stats_by_device' => 'setStatsByDevice', + 'stats_by_browser' => 'setStatsByBrowser' ]; /** @@ -142,14 +142,14 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'globalStats' => 'getGlobalStats', - 'campaignStats' => 'getCampaignStats', - 'mirrorClick' => 'getMirrorClick', + 'global_stats' => 'getGlobalStats', + 'campaign_stats' => 'getCampaignStats', + 'mirror_click' => 'getMirrorClick', 'remaining' => 'getRemaining', - 'linksStats' => 'getLinksStats', - 'statsByDomain' => 'getStatsByDomain', - 'statsByDevice' => 'getStatsByDevice', - 'statsByBrowser' => 'getStatsByBrowser' + 'links_stats' => 'getLinksStats', + 'stats_by_domain' => 'getStatsByDomain', + 'stats_by_device' => 'getStatsByDevice', + 'stats_by_browser' => 'getStatsByBrowser' ]; /** @@ -212,14 +212,14 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['globalStats'] = isset($data['globalStats']) ? $data['globalStats'] : null; - $this->container['campaignStats'] = isset($data['campaignStats']) ? $data['campaignStats'] : null; - $this->container['mirrorClick'] = isset($data['mirrorClick']) ? $data['mirrorClick'] : null; + $this->container['global_stats'] = isset($data['global_stats']) ? $data['global_stats'] : null; + $this->container['campaign_stats'] = isset($data['campaign_stats']) ? $data['campaign_stats'] : null; + $this->container['mirror_click'] = isset($data['mirror_click']) ? $data['mirror_click'] : null; $this->container['remaining'] = isset($data['remaining']) ? $data['remaining'] : null; - $this->container['linksStats'] = isset($data['linksStats']) ? $data['linksStats'] : null; - $this->container['statsByDomain'] = isset($data['statsByDomain']) ? $data['statsByDomain'] : null; - $this->container['statsByDevice'] = isset($data['statsByDevice']) ? $data['statsByDevice'] : null; - $this->container['statsByBrowser'] = isset($data['statsByBrowser']) ? $data['statsByBrowser'] : null; + $this->container['links_stats'] = isset($data['links_stats']) ? $data['links_stats'] : null; + $this->container['stats_by_domain'] = isset($data['stats_by_domain']) ? $data['stats_by_domain'] : null; + $this->container['stats_by_device'] = isset($data['stats_by_device']) ? $data['stats_by_device'] : null; + $this->container['stats_by_browser'] = isset($data['stats_by_browser']) ? $data['stats_by_browser'] : null; } /** @@ -231,29 +231,29 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['globalStats'] === null) { - $invalidProperties[] = "'globalStats' can't be null"; + if ($this->container['global_stats'] === null) { + $invalidProperties[] = "'global_stats' can't be null"; } - if ($this->container['campaignStats'] === null) { - $invalidProperties[] = "'campaignStats' can't be null"; + if ($this->container['campaign_stats'] === null) { + $invalidProperties[] = "'campaign_stats' can't be null"; } - if ($this->container['mirrorClick'] === null) { - $invalidProperties[] = "'mirrorClick' can't be null"; + if ($this->container['mirror_click'] === null) { + $invalidProperties[] = "'mirror_click' can't be null"; } if ($this->container['remaining'] === null) { $invalidProperties[] = "'remaining' can't be null"; } - if ($this->container['linksStats'] === null) { - $invalidProperties[] = "'linksStats' can't be null"; + if ($this->container['links_stats'] === null) { + $invalidProperties[] = "'links_stats' can't be null"; } - if ($this->container['statsByDomain'] === null) { - $invalidProperties[] = "'statsByDomain' can't be null"; + if ($this->container['stats_by_domain'] === null) { + $invalidProperties[] = "'stats_by_domain' can't be null"; } - if ($this->container['statsByDevice'] === null) { - $invalidProperties[] = "'statsByDevice' can't be null"; + if ($this->container['stats_by_device'] === null) { + $invalidProperties[] = "'stats_by_device' can't be null"; } - if ($this->container['statsByBrowser'] === null) { - $invalidProperties[] = "'statsByBrowser' can't be null"; + if ($this->container['stats_by_browser'] === null) { + $invalidProperties[] = "'stats_by_browser' can't be null"; } return $invalidProperties; } @@ -271,73 +271,73 @@ public function valid() /** - * Gets globalStats + * Gets global_stats * * @return \SendinBlue\Client\Model\GetExtendedCampaignStatsGlobalStats */ public function getGlobalStats() { - return $this->container['globalStats']; + return $this->container['global_stats']; } /** - * Sets globalStats + * Sets global_stats * - * @param \SendinBlue\Client\Model\GetExtendedCampaignStatsGlobalStats $globalStats globalStats + * @param \SendinBlue\Client\Model\GetExtendedCampaignStatsGlobalStats $global_stats global_stats * * @return $this */ - public function setGlobalStats($globalStats) + public function setGlobalStats($global_stats) { - $this->container['globalStats'] = $globalStats; + $this->container['global_stats'] = $global_stats; return $this; } /** - * Gets campaignStats + * Gets campaign_stats * * @return object[] */ public function getCampaignStats() { - return $this->container['campaignStats']; + return $this->container['campaign_stats']; } /** - * Sets campaignStats + * Sets campaign_stats * - * @param object[] $campaignStats List-wise statistics of the campaign. + * @param object[] $campaign_stats List-wise statistics of the campaign. * * @return $this */ - public function setCampaignStats($campaignStats) + public function setCampaignStats($campaign_stats) { - $this->container['campaignStats'] = $campaignStats; + $this->container['campaign_stats'] = $campaign_stats; return $this; } /** - * Gets mirrorClick + * Gets mirror_click * * @return int */ public function getMirrorClick() { - return $this->container['mirrorClick']; + return $this->container['mirror_click']; } /** - * Sets mirrorClick + * Sets mirror_click * - * @param int $mirrorClick Number of clicks on mirror link + * @param int $mirror_click Number of clicks on mirror link * * @return $this */ - public function setMirrorClick($mirrorClick) + public function setMirrorClick($mirror_click) { - $this->container['mirrorClick'] = $mirrorClick; + $this->container['mirror_click'] = $mirror_click; return $this; } @@ -367,97 +367,97 @@ public function setRemaining($remaining) } /** - * Gets linksStats + * Gets links_stats * * @return object */ public function getLinksStats() { - return $this->container['linksStats']; + return $this->container['links_stats']; } /** - * Sets linksStats + * Sets links_stats * - * @param object $linksStats Statistics about the number of clicks for the links + * @param object $links_stats Statistics about the number of clicks for the links * * @return $this */ - public function setLinksStats($linksStats) + public function setLinksStats($links_stats) { - $this->container['linksStats'] = $linksStats; + $this->container['links_stats'] = $links_stats; return $this; } /** - * Gets statsByDomain + * Gets stats_by_domain * * @return \SendinBlue\Client\Model\GetStatsByDomain */ public function getStatsByDomain() { - return $this->container['statsByDomain']; + return $this->container['stats_by_domain']; } /** - * Sets statsByDomain + * Sets stats_by_domain * - * @param \SendinBlue\Client\Model\GetStatsByDomain $statsByDomain statsByDomain + * @param \SendinBlue\Client\Model\GetStatsByDomain $stats_by_domain stats_by_domain * * @return $this */ - public function setStatsByDomain($statsByDomain) + public function setStatsByDomain($stats_by_domain) { - $this->container['statsByDomain'] = $statsByDomain; + $this->container['stats_by_domain'] = $stats_by_domain; return $this; } /** - * Gets statsByDevice + * Gets stats_by_device * * @return \SendinBlue\Client\Model\GetStatsByDevice */ public function getStatsByDevice() { - return $this->container['statsByDevice']; + return $this->container['stats_by_device']; } /** - * Sets statsByDevice + * Sets stats_by_device * - * @param \SendinBlue\Client\Model\GetStatsByDevice $statsByDevice Statistics about the campaign on the basis of various devices + * @param \SendinBlue\Client\Model\GetStatsByDevice $stats_by_device Statistics about the campaign on the basis of various devices * * @return $this */ - public function setStatsByDevice($statsByDevice) + public function setStatsByDevice($stats_by_device) { - $this->container['statsByDevice'] = $statsByDevice; + $this->container['stats_by_device'] = $stats_by_device; return $this; } /** - * Gets statsByBrowser + * Gets stats_by_browser * * @return \SendinBlue\Client\Model\GetStatsByBrowser */ public function getStatsByBrowser() { - return $this->container['statsByBrowser']; + return $this->container['stats_by_browser']; } /** - * Sets statsByBrowser + * Sets stats_by_browser * - * @param \SendinBlue\Client\Model\GetStatsByBrowser $statsByBrowser Statistics about the campaign on the basis of various browsers + * @param \SendinBlue\Client\Model\GetStatsByBrowser $stats_by_browser Statistics about the campaign on the basis of various browsers * * @return $this */ - public function setStatsByBrowser($statsByBrowser) + public function setStatsByBrowser($stats_by_browser) { - $this->container['statsByBrowser'] = $statsByBrowser; + $this->container['stats_by_browser'] = $stats_by_browser; return $this; } @@ -468,6 +468,7 @@ public function setStatsByBrowser($statsByBrowser) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -480,6 +481,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -493,6 +495,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -509,6 +512,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetExtendedCampaignStatsGlobalStats.php b/lib/Model/GetExtendedCampaignStatsGlobalStats.php index 48b928bd..8c31e2e3 100644 --- a/lib/Model/GetExtendedCampaignStatsGlobalStats.php +++ b/lib/Model/GetExtendedCampaignStatsGlobalStats.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -210,6 +210,7 @@ public function valid() * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -222,6 +223,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -235,6 +237,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -251,6 +254,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetExtendedClient.php b/lib/Model/GetExtendedClient.php index 4ca84d17..13ca9725 100644 --- a/lib/Model/GetExtendedClient.php +++ b/lib/Model/GetExtendedClient.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -231,6 +231,7 @@ public function setAddress($address) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -243,6 +244,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -256,6 +258,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -272,6 +275,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetExtendedClientAddress.php b/lib/Model/GetExtendedClientAddress.php index 544858fe..1a381793 100644 --- a/lib/Model/GetExtendedClientAddress.php +++ b/lib/Model/GetExtendedClientAddress.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -60,7 +60,7 @@ class GetExtendedClientAddress implements ModelInterface, ArrayAccess protected static $swaggerTypes = [ 'street' => 'string', 'city' => 'string', - 'zipCode' => 'string', + 'zip_code' => 'string', 'country' => 'string' ]; @@ -72,7 +72,7 @@ class GetExtendedClientAddress implements ModelInterface, ArrayAccess protected static $swaggerFormats = [ 'street' => null, 'city' => null, - 'zipCode' => null, + 'zip_code' => null, 'country' => null ]; @@ -105,7 +105,7 @@ public static function swaggerFormats() protected static $attributeMap = [ 'street' => 'street', 'city' => 'city', - 'zipCode' => 'zipCode', + 'zip_code' => 'zipCode', 'country' => 'country' ]; @@ -117,7 +117,7 @@ public static function swaggerFormats() protected static $setters = [ 'street' => 'setStreet', 'city' => 'setCity', - 'zipCode' => 'setZipCode', + 'zip_code' => 'setZipCode', 'country' => 'setCountry' ]; @@ -129,7 +129,7 @@ public static function swaggerFormats() protected static $getters = [ 'street' => 'getStreet', 'city' => 'getCity', - 'zipCode' => 'getZipCode', + 'zip_code' => 'getZipCode', 'country' => 'getCountry' ]; @@ -195,7 +195,7 @@ public function __construct(array $data = null) { $this->container['street'] = isset($data['street']) ? $data['street'] : null; $this->container['city'] = isset($data['city']) ? $data['city'] : null; - $this->container['zipCode'] = isset($data['zipCode']) ? $data['zipCode'] : null; + $this->container['zip_code'] = isset($data['zip_code']) ? $data['zip_code'] : null; $this->container['country'] = isset($data['country']) ? $data['country'] : null; } @@ -214,8 +214,8 @@ public function listInvalidProperties() if ($this->container['city'] === null) { $invalidProperties[] = "'city' can't be null"; } - if ($this->container['zipCode'] === null) { - $invalidProperties[] = "'zipCode' can't be null"; + if ($this->container['zip_code'] === null) { + $invalidProperties[] = "'zip_code' can't be null"; } if ($this->container['country'] === null) { $invalidProperties[] = "'country' can't be null"; @@ -284,25 +284,25 @@ public function setCity($city) } /** - * Gets zipCode + * Gets zip_code * * @return string */ public function getZipCode() { - return $this->container['zipCode']; + return $this->container['zip_code']; } /** - * Sets zipCode + * Sets zip_code * - * @param string $zipCode Zip Code information + * @param string $zip_code Zip Code information * * @return $this */ - public function setZipCode($zipCode) + public function setZipCode($zip_code) { - $this->container['zipCode'] = $zipCode; + $this->container['zip_code'] = $zip_code; return $this; } @@ -337,6 +337,7 @@ public function setCountry($country) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -349,6 +350,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -362,6 +364,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -378,6 +381,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetExtendedContactDetails.php b/lib/Model/GetExtendedContactDetails.php index a007f660..ff8a1fab 100644 --- a/lib/Model/GetExtendedContactDetails.php +++ b/lib/Model/GetExtendedContactDetails.php @@ -9,6 +9,7 @@ * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ + /** * SendinBlue API * @@ -17,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -27,8 +28,6 @@ */ namespace SendinBlue\Client\Model; - -use \ArrayAccess; use \SendinBlue\Client\ObjectSerializer; /** @@ -39,7 +38,7 @@ * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class GetExtendedContactDetails implements ModelInterface, ArrayAccess +class GetExtendedContactDetails extends GetContactDetails { const DISCRIMINATOR = null; @@ -49,21 +48,13 @@ class GetExtendedContactDetails implements ModelInterface, ArrayAccess * @var string */ protected static $swaggerModelName = 'getExtendedContactDetails'; + /** * Array of property to type mappings. Used for (de)serialization * * @var string[] */ protected static $swaggerTypes = [ - 'email' => 'string', - 'id' => 'int', - 'emailBlacklisted' => 'bool', - 'smsBlacklisted' => 'bool', - 'createdAt' => 'string', - 'modifiedAt' => 'string', - 'listIds' => 'int[]', - 'listUnsubscribed' => 'int[]', - 'attributes' => 'object', 'statistics' => '\SendinBlue\Client\Model\GetExtendedContactDetailsStatistics' ]; @@ -73,15 +64,6 @@ class GetExtendedContactDetails implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'email' => 'email', - 'id' => 'int64', - 'emailBlacklisted' => null, - 'smsBlacklisted' => null, - 'createdAt' => null, - 'modifiedAt' => null, - 'listIds' => 'int64', - 'listUnsubscribed' => 'int64', - 'attributes' => null, 'statistics' => null ]; @@ -92,7 +74,7 @@ class GetExtendedContactDetails implements ModelInterface, ArrayAccess */ public static function swaggerTypes() { - return self::$swaggerTypes; + return self::$swaggerTypes + parent::swaggerTypes(); } /** @@ -102,7 +84,7 @@ public static function swaggerTypes() */ public static function swaggerFormats() { - return self::$swaggerFormats; + return self::$swaggerFormats + parent::swaggerFormats(); } /** @@ -112,15 +94,6 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'email' => 'email', - 'id' => 'id', - 'emailBlacklisted' => 'emailBlacklisted', - 'smsBlacklisted' => 'smsBlacklisted', - 'createdAt' => 'createdAt', - 'modifiedAt' => 'modifiedAt', - 'listIds' => 'listIds', - 'listUnsubscribed' => 'listUnsubscribed', - 'attributes' => 'attributes', 'statistics' => 'statistics' ]; @@ -130,15 +103,6 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'email' => 'setEmail', - 'id' => 'setId', - 'emailBlacklisted' => 'setEmailBlacklisted', - 'smsBlacklisted' => 'setSmsBlacklisted', - 'createdAt' => 'setCreatedAt', - 'modifiedAt' => 'setModifiedAt', - 'listIds' => 'setListIds', - 'listUnsubscribed' => 'setListUnsubscribed', - 'attributes' => 'setAttributes', 'statistics' => 'setStatistics' ]; @@ -148,15 +112,6 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'email' => 'getEmail', - 'id' => 'getId', - 'emailBlacklisted' => 'getEmailBlacklisted', - 'smsBlacklisted' => 'getSmsBlacklisted', - 'createdAt' => 'getCreatedAt', - 'modifiedAt' => 'getModifiedAt', - 'listIds' => 'getListIds', - 'listUnsubscribed' => 'getListUnsubscribed', - 'attributes' => 'getAttributes', 'statistics' => 'getStatistics' ]; @@ -168,7 +123,7 @@ public static function swaggerFormats() */ public static function attributeMap() { - return self::$attributeMap; + return parent::attributeMap() + self::$attributeMap; } /** @@ -178,7 +133,7 @@ public static function attributeMap() */ public static function setters() { - return self::$setters; + return parent::setters() + self::$setters; } /** @@ -188,7 +143,7 @@ public static function setters() */ public static function getters() { - return self::$getters; + return parent::getters() + self::$getters; } /** @@ -200,17 +155,12 @@ public function getModelName() { return self::$swaggerModelName; } + + - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - /** * Constructor * @@ -219,15 +169,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['email'] = isset($data['email']) ? $data['email'] : null; - $this->container['id'] = isset($data['id']) ? $data['id'] : null; - $this->container['emailBlacklisted'] = isset($data['emailBlacklisted']) ? $data['emailBlacklisted'] : null; - $this->container['smsBlacklisted'] = isset($data['smsBlacklisted']) ? $data['smsBlacklisted'] : null; - $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; - $this->container['modifiedAt'] = isset($data['modifiedAt']) ? $data['modifiedAt'] : null; - $this->container['listIds'] = isset($data['listIds']) ? $data['listIds'] : null; - $this->container['listUnsubscribed'] = isset($data['listUnsubscribed']) ? $data['listUnsubscribed'] : null; - $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; + parent::__construct($data); + $this->container['statistics'] = isset($data['statistics']) ? $data['statistics'] : null; } @@ -238,37 +181,14 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; + $invalidProperties = parent::listInvalidProperties(); - if ($this->container['email'] === null) { - $invalidProperties[] = "'email' can't be null"; - } - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } - if ($this->container['emailBlacklisted'] === null) { - $invalidProperties[] = "'emailBlacklisted' can't be null"; - } - if ($this->container['smsBlacklisted'] === null) { - $invalidProperties[] = "'smsBlacklisted' can't be null"; - } - if ($this->container['createdAt'] === null) { - $invalidProperties[] = "'createdAt' can't be null"; - } - if ($this->container['modifiedAt'] === null) { - $invalidProperties[] = "'modifiedAt' can't be null"; - } - if ($this->container['listIds'] === null) { - $invalidProperties[] = "'listIds' can't be null"; - } - if ($this->container['attributes'] === null) { - $invalidProperties[] = "'attributes' can't be null"; - } if ($this->container['statistics'] === null) { $invalidProperties[] = "'statistics' can't be null"; } return $invalidProperties; } + /** * Validate all the properties in the model * return true if all passed @@ -281,222 +201,6 @@ public function valid() } - /** - * Gets email - * - * @return string - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string $email Email address of the contact for which you requested the details - * - * @return $this - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets id - * - * @return int - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param int $id ID of the contact for which you requested the details - * - * @return $this - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets emailBlacklisted - * - * @return bool - */ - public function getEmailBlacklisted() - { - return $this->container['emailBlacklisted']; - } - - /** - * Sets emailBlacklisted - * - * @param bool $emailBlacklisted Blacklist status for email campaigns (true=blacklisted, false=not blacklisted) - * - * @return $this - */ - public function setEmailBlacklisted($emailBlacklisted) - { - $this->container['emailBlacklisted'] = $emailBlacklisted; - - return $this; - } - - /** - * Gets smsBlacklisted - * - * @return bool - */ - public function getSmsBlacklisted() - { - return $this->container['smsBlacklisted']; - } - - /** - * Sets smsBlacklisted - * - * @param bool $smsBlacklisted Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted) - * - * @return $this - */ - public function setSmsBlacklisted($smsBlacklisted) - { - $this->container['smsBlacklisted'] = $smsBlacklisted; - - return $this; - } - - /** - * Gets createdAt - * - * @return string - */ - public function getCreatedAt() - { - return $this->container['createdAt']; - } - - /** - * Sets createdAt - * - * @param string $createdAt Creation UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) - * - * @return $this - */ - public function setCreatedAt($createdAt) - { - $this->container['createdAt'] = $createdAt; - - return $this; - } - - /** - * Gets modifiedAt - * - * @return string - */ - public function getModifiedAt() - { - return $this->container['modifiedAt']; - } - - /** - * Sets modifiedAt - * - * @param string $modifiedAt Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) - * - * @return $this - */ - public function setModifiedAt($modifiedAt) - { - $this->container['modifiedAt'] = $modifiedAt; - - return $this; - } - - /** - * Gets listIds - * - * @return int[] - */ - public function getListIds() - { - return $this->container['listIds']; - } - - /** - * Sets listIds - * - * @param int[] $listIds listIds - * - * @return $this - */ - public function setListIds($listIds) - { - $this->container['listIds'] = $listIds; - - return $this; - } - - /** - * Gets listUnsubscribed - * - * @return int[] - */ - public function getListUnsubscribed() - { - return $this->container['listUnsubscribed']; - } - - /** - * Sets listUnsubscribed - * - * @param int[] $listUnsubscribed listUnsubscribed - * - * @return $this - */ - public function setListUnsubscribed($listUnsubscribed) - { - $this->container['listUnsubscribed'] = $listUnsubscribed; - - return $this; - } - - /** - * Gets attributes - * - * @return object - */ - public function getAttributes() - { - return $this->container['attributes']; - } - - /** - * Sets attributes - * - * @param object $attributes Set of attributes of the contact - * - * @return $this - */ - public function setAttributes($attributes) - { - $this->container['attributes'] = $attributes; - - return $this; - } - /** * Gets statistics * @@ -506,6 +210,7 @@ public function getStatistics() { return $this->container['statistics']; } + /** * Sets statistics * @@ -516,6 +221,7 @@ public function getStatistics() public function setStatistics($statistics) { $this->container['statistics'] = $statistics; + return $this; } /** @@ -525,10 +231,12 @@ public function setStatistics($statistics) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); } + /** * Gets offset. * @@ -536,10 +244,12 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; } + /** * Sets value based on offset. * @@ -548,6 +258,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -556,6 +267,7 @@ public function offsetSet($offset, $value) $this->container[$offset] = $value; } } + /** * Unsets offset. * @@ -563,10 +275,12 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } + /** * Gets the string presentation of the object * @@ -580,6 +294,9 @@ public function __toString() JSON_PRETTY_PRINT ); } + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } -} \ No newline at end of file +} + + diff --git a/lib/Model/GetExtendedContactDetailsStatistics.php b/lib/Model/GetExtendedContactDetailsStatistics.php index 1e2e602f..5488aa76 100644 --- a/lib/Model/GetExtendedContactDetailsStatistics.php +++ b/lib/Model/GetExtendedContactDetailsStatistics.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -58,15 +58,14 @@ class GetExtendedContactDetailsStatistics implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'messagesSent' => '\SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]', - 'hardBounces' => '\SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]', - 'softBounces' => '\SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]', + 'messages_sent' => '\SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]', + 'hard_bounces' => '\SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]', + 'soft_bounces' => '\SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]', 'complaints' => '\SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]', 'unsubscriptions' => '\SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptions', 'opened' => '\SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsOpened[]', 'clicked' => '\SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsClicked[]', - 'transacAttributes' => 'object[]', - 'delivered' => '\SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsDelivered[]' + 'transac_attributes' => 'object[]' ]; /** @@ -75,15 +74,14 @@ class GetExtendedContactDetailsStatistics implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'messagesSent' => null, - 'hardBounces' => null, - 'softBounces' => null, + 'messages_sent' => null, + 'hard_bounces' => null, + 'soft_bounces' => null, 'complaints' => null, 'unsubscriptions' => null, 'opened' => null, 'clicked' => null, - 'transacAttributes' => null, - 'delivered' => null + 'transac_attributes' => null ]; /** @@ -113,15 +111,14 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'messagesSent' => 'messagesSent', - 'hardBounces' => 'hardBounces', - 'softBounces' => 'softBounces', + 'messages_sent' => 'messagesSent', + 'hard_bounces' => 'hardBounces', + 'soft_bounces' => 'softBounces', 'complaints' => 'complaints', 'unsubscriptions' => 'unsubscriptions', 'opened' => 'opened', 'clicked' => 'clicked', - 'transacAttributes' => 'transacAttributes', - 'delivered' => 'delivered' + 'transac_attributes' => 'transacAttributes' ]; /** @@ -130,15 +127,14 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'messagesSent' => 'setMessagesSent', - 'hardBounces' => 'setHardBounces', - 'softBounces' => 'setSoftBounces', + 'messages_sent' => 'setMessagesSent', + 'hard_bounces' => 'setHardBounces', + 'soft_bounces' => 'setSoftBounces', 'complaints' => 'setComplaints', 'unsubscriptions' => 'setUnsubscriptions', 'opened' => 'setOpened', 'clicked' => 'setClicked', - 'transacAttributes' => 'setTransacAttributes', - 'delivered' => 'setDelivered' + 'transac_attributes' => 'setTransacAttributes' ]; /** @@ -147,15 +143,14 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'messagesSent' => 'getMessagesSent', - 'hardBounces' => 'getHardBounces', - 'softBounces' => 'getSoftBounces', + 'messages_sent' => 'getMessagesSent', + 'hard_bounces' => 'getHardBounces', + 'soft_bounces' => 'getSoftBounces', 'complaints' => 'getComplaints', 'unsubscriptions' => 'getUnsubscriptions', 'opened' => 'getOpened', 'clicked' => 'getClicked', - 'transacAttributes' => 'getTransacAttributes', - 'delivered' => 'getDelivered' + 'transac_attributes' => 'getTransacAttributes' ]; /** @@ -218,15 +213,14 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['messagesSent'] = isset($data['messagesSent']) ? $data['messagesSent'] : null; - $this->container['hardBounces'] = isset($data['hardBounces']) ? $data['hardBounces'] : null; - $this->container['softBounces'] = isset($data['softBounces']) ? $data['softBounces'] : null; + $this->container['messages_sent'] = isset($data['messages_sent']) ? $data['messages_sent'] : null; + $this->container['hard_bounces'] = isset($data['hard_bounces']) ? $data['hard_bounces'] : null; + $this->container['soft_bounces'] = isset($data['soft_bounces']) ? $data['soft_bounces'] : null; $this->container['complaints'] = isset($data['complaints']) ? $data['complaints'] : null; $this->container['unsubscriptions'] = isset($data['unsubscriptions']) ? $data['unsubscriptions'] : null; $this->container['opened'] = isset($data['opened']) ? $data['opened'] : null; $this->container['clicked'] = isset($data['clicked']) ? $data['clicked'] : null; - $this->container['transacAttributes'] = isset($data['transacAttributes']) ? $data['transacAttributes'] : null; - $this->container['delivered'] = isset($data['delivered']) ? $data['delivered'] : null; + $this->container['transac_attributes'] = isset($data['transac_attributes']) ? $data['transac_attributes'] : null; } /** @@ -254,73 +248,73 @@ public function valid() /** - * Gets messagesSent + * Gets messages_sent * * @return \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] */ public function getMessagesSent() { - return $this->container['messagesSent']; + return $this->container['messages_sent']; } /** - * Sets messagesSent + * Sets messages_sent * - * @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] $messagesSent Listing of the sent campaign for the contact + * @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] $messages_sent Listing of the sent campaign for the contact * * @return $this */ - public function setMessagesSent($messagesSent) + public function setMessagesSent($messages_sent) { - $this->container['messagesSent'] = $messagesSent; + $this->container['messages_sent'] = $messages_sent; return $this; } /** - * Gets hardBounces + * Gets hard_bounces * * @return \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] */ public function getHardBounces() { - return $this->container['hardBounces']; + return $this->container['hard_bounces']; } /** - * Sets hardBounces + * Sets hard_bounces * - * @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] $hardBounces Listing of the hardbounes generated by the contact + * @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] $hard_bounces Listing of the hardbounes generated by the contact * * @return $this */ - public function setHardBounces($hardBounces) + public function setHardBounces($hard_bounces) { - $this->container['hardBounces'] = $hardBounces; + $this->container['hard_bounces'] = $hard_bounces; return $this; } /** - * Gets softBounces + * Gets soft_bounces * * @return \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] */ public function getSoftBounces() { - return $this->container['softBounces']; + return $this->container['soft_bounces']; } /** - * Sets softBounces + * Sets soft_bounces * - * @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] $softBounces Listing of the softbounes generated by the contact + * @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] $soft_bounces Listing of the softbounes generated by the contact * * @return $this */ - public function setSoftBounces($softBounces) + public function setSoftBounces($soft_bounces) { - $this->container['softBounces'] = $softBounces; + $this->container['soft_bounces'] = $soft_bounces; return $this; } @@ -422,49 +416,25 @@ public function setClicked($clicked) } /** - * Gets transacAttributes + * Gets transac_attributes * * @return object[] */ public function getTransacAttributes() { - return $this->container['transacAttributes']; + return $this->container['transac_attributes']; } /** - * Sets transacAttributes + * Sets transac_attributes * - * @param object[] $transacAttributes Listing of the transactional attributes for the contact + * @param object[] $transac_attributes Listing of the transactional attributes for the contact * * @return $this */ - public function setTransacAttributes($transacAttributes) + public function setTransacAttributes($transac_attributes) { - $this->container['transacAttributes'] = $transacAttributes; - - return $this; - } - - /** - * Gets delivered - * - * @return \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsDelivered[] - */ - public function getDelivered() - { - return $this->container['delivered']; - } - - /** - * Sets delivered - * - * @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsDelivered[] $delivered Listing of the delivered campaign for the contact - * - * @return $this - */ - public function setDelivered($delivered) - { - $this->container['delivered'] = $delivered; + $this->container['transac_attributes'] = $transac_attributes; return $this; } @@ -475,6 +445,7 @@ public function setDelivered($delivered) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -487,6 +458,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -500,6 +472,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -516,6 +489,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetExtendedContactDetailsStatisticsClicked.php b/lib/Model/GetExtendedContactDetailsStatisticsClicked.php index b7d7987b..09f5bd9b 100644 --- a/lib/Model/GetExtendedContactDetailsStatisticsClicked.php +++ b/lib/Model/GetExtendedContactDetailsStatisticsClicked.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -57,7 +57,7 @@ class GetExtendedContactDetailsStatisticsClicked implements ModelInterface, Arra * @var string[] */ protected static $swaggerTypes = [ - 'campaignId' => 'int', + 'campaign_id' => 'int', 'links' => '\SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsLinks[]' ]; @@ -67,7 +67,7 @@ class GetExtendedContactDetailsStatisticsClicked implements ModelInterface, Arra * @var string[] */ protected static $swaggerFormats = [ - 'campaignId' => 'int64', + 'campaign_id' => 'int64', 'links' => null ]; @@ -98,7 +98,7 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'campaignId' => 'campaignId', + 'campaign_id' => 'campaignId', 'links' => 'links' ]; @@ -108,7 +108,7 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'campaignId' => 'setCampaignId', + 'campaign_id' => 'setCampaignId', 'links' => 'setLinks' ]; @@ -118,7 +118,7 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'campaignId' => 'getCampaignId', + 'campaign_id' => 'getCampaignId', 'links' => 'getLinks' ]; @@ -182,7 +182,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['campaignId'] = isset($data['campaignId']) ? $data['campaignId'] : null; + $this->container['campaign_id'] = isset($data['campaign_id']) ? $data['campaign_id'] : null; $this->container['links'] = isset($data['links']) ? $data['links'] : null; } @@ -195,8 +195,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['campaignId'] === null) { - $invalidProperties[] = "'campaignId' can't be null"; + if ($this->container['campaign_id'] === null) { + $invalidProperties[] = "'campaign_id' can't be null"; } if ($this->container['links'] === null) { $invalidProperties[] = "'links' can't be null"; @@ -217,25 +217,25 @@ public function valid() /** - * Gets campaignId + * Gets campaign_id * * @return int */ public function getCampaignId() { - return $this->container['campaignId']; + return $this->container['campaign_id']; } /** - * Sets campaignId + * Sets campaign_id * - * @param int $campaignId ID of the campaign which generated the event + * @param int $campaign_id ID of the campaign which generated the event * * @return $this */ - public function setCampaignId($campaignId) + public function setCampaignId($campaign_id) { - $this->container['campaignId'] = $campaignId; + $this->container['campaign_id'] = $campaign_id; return $this; } @@ -270,6 +270,7 @@ public function setLinks($links) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -282,6 +283,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -295,6 +297,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -311,6 +314,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetExtendedContactDetailsStatisticsDelivered.php b/lib/Model/GetExtendedContactDetailsStatisticsDelivered.php deleted file mode 100644 index 96c020af..00000000 --- a/lib/Model/GetExtendedContactDetailsStatisticsDelivered.php +++ /dev/null @@ -1,337 +0,0 @@ - 'int', - 'eventTime' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'campaignId' => 'int64', - 'eventTime' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'campaignId' => 'campaignId', - 'eventTime' => 'eventTime' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'campaignId' => 'setCampaignId', - 'eventTime' => 'setEventTime' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'campaignId' => 'getCampaignId', - 'eventTime' => 'getEventTime' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['campaignId'] = isset($data['campaignId']) ? $data['campaignId'] : null; - $this->container['eventTime'] = isset($data['eventTime']) ? $data['eventTime'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['campaignId'] === null) { - $invalidProperties[] = "'campaignId' can't be null"; - } - if ($this->container['eventTime'] === null) { - $invalidProperties[] = "'eventTime' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets campaignId - * - * @return int - */ - public function getCampaignId() - { - return $this->container['campaignId']; - } - - /** - * Sets campaignId - * - * @param int $campaignId ID of the campaign which generated the event - * - * @return $this - */ - public function setCampaignId($campaignId) - { - $this->container['campaignId'] = $campaignId; - - return $this; - } - - /** - * Gets eventTime - * - * @return string - */ - public function getEventTime() - { - return $this->container['eventTime']; - } - - /** - * Sets eventTime - * - * @param string $eventTime UTC date-time of the event - * - * @return $this - */ - public function setEventTime($eventTime) - { - $this->container['eventTime'] = $eventTime; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/GetExtendedContactDetailsStatisticsLinks.php b/lib/Model/GetExtendedContactDetailsStatisticsLinks.php index 1ac644a9..5c626fb7 100644 --- a/lib/Model/GetExtendedContactDetailsStatisticsLinks.php +++ b/lib/Model/GetExtendedContactDetailsStatisticsLinks.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -58,7 +58,7 @@ class GetExtendedContactDetailsStatisticsLinks implements ModelInterface, ArrayA */ protected static $swaggerTypes = [ 'count' => 'int', - 'eventTime' => 'string', + 'event_time' => '\DateTime', 'ip' => 'string', 'url' => 'string' ]; @@ -70,7 +70,7 @@ class GetExtendedContactDetailsStatisticsLinks implements ModelInterface, ArrayA */ protected static $swaggerFormats = [ 'count' => 'int64', - 'eventTime' => null, + 'event_time' => 'date-time', 'ip' => null, 'url' => null ]; @@ -103,7 +103,7 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'count' => 'count', - 'eventTime' => 'eventTime', + 'event_time' => 'eventTime', 'ip' => 'ip', 'url' => 'url' ]; @@ -115,7 +115,7 @@ public static function swaggerFormats() */ protected static $setters = [ 'count' => 'setCount', - 'eventTime' => 'setEventTime', + 'event_time' => 'setEventTime', 'ip' => 'setIp', 'url' => 'setUrl' ]; @@ -127,7 +127,7 @@ public static function swaggerFormats() */ protected static $getters = [ 'count' => 'getCount', - 'eventTime' => 'getEventTime', + 'event_time' => 'getEventTime', 'ip' => 'getIp', 'url' => 'getUrl' ]; @@ -193,7 +193,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['count'] = isset($data['count']) ? $data['count'] : null; - $this->container['eventTime'] = isset($data['eventTime']) ? $data['eventTime'] : null; + $this->container['event_time'] = isset($data['event_time']) ? $data['event_time'] : null; $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; $this->container['url'] = isset($data['url']) ? $data['url'] : null; } @@ -210,8 +210,8 @@ public function listInvalidProperties() if ($this->container['count'] === null) { $invalidProperties[] = "'count' can't be null"; } - if ($this->container['eventTime'] === null) { - $invalidProperties[] = "'eventTime' can't be null"; + if ($this->container['event_time'] === null) { + $invalidProperties[] = "'event_time' can't be null"; } if ($this->container['ip'] === null) { $invalidProperties[] = "'ip' can't be null"; @@ -259,25 +259,25 @@ public function setCount($count) } /** - * Gets eventTime + * Gets event_time * - * @return string + * @return \DateTime */ public function getEventTime() { - return $this->container['eventTime']; + return $this->container['event_time']; } /** - * Sets eventTime + * Sets event_time * - * @param string $eventTime UTC date-time of the event + * @param \DateTime $event_time UTC date-time of the event * * @return $this */ - public function setEventTime($eventTime) + public function setEventTime($event_time) { - $this->container['eventTime'] = $eventTime; + $this->container['event_time'] = $event_time; return $this; } @@ -336,6 +336,7 @@ public function setUrl($url) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -348,6 +349,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -361,6 +363,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -377,6 +380,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetExtendedContactDetailsStatisticsMessagesSent.php b/lib/Model/GetExtendedContactDetailsStatisticsMessagesSent.php index ba785569..e89cec05 100644 --- a/lib/Model/GetExtendedContactDetailsStatisticsMessagesSent.php +++ b/lib/Model/GetExtendedContactDetailsStatisticsMessagesSent.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -57,8 +57,8 @@ class GetExtendedContactDetailsStatisticsMessagesSent implements ModelInterface, * @var string[] */ protected static $swaggerTypes = [ - 'campaignId' => 'int', - 'eventTime' => 'string' + 'campaign_id' => 'int', + 'event_time' => '\DateTime' ]; /** @@ -67,8 +67,8 @@ class GetExtendedContactDetailsStatisticsMessagesSent implements ModelInterface, * @var string[] */ protected static $swaggerFormats = [ - 'campaignId' => 'int64', - 'eventTime' => null + 'campaign_id' => 'int64', + 'event_time' => 'date-time' ]; /** @@ -98,8 +98,8 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'campaignId' => 'campaignId', - 'eventTime' => 'eventTime' + 'campaign_id' => 'campaignId', + 'event_time' => 'eventTime' ]; /** @@ -108,8 +108,8 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'campaignId' => 'setCampaignId', - 'eventTime' => 'setEventTime' + 'campaign_id' => 'setCampaignId', + 'event_time' => 'setEventTime' ]; /** @@ -118,8 +118,8 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'campaignId' => 'getCampaignId', - 'eventTime' => 'getEventTime' + 'campaign_id' => 'getCampaignId', + 'event_time' => 'getEventTime' ]; /** @@ -182,8 +182,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['campaignId'] = isset($data['campaignId']) ? $data['campaignId'] : null; - $this->container['eventTime'] = isset($data['eventTime']) ? $data['eventTime'] : null; + $this->container['campaign_id'] = isset($data['campaign_id']) ? $data['campaign_id'] : null; + $this->container['event_time'] = isset($data['event_time']) ? $data['event_time'] : null; } /** @@ -195,11 +195,11 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['campaignId'] === null) { - $invalidProperties[] = "'campaignId' can't be null"; + if ($this->container['campaign_id'] === null) { + $invalidProperties[] = "'campaign_id' can't be null"; } - if ($this->container['eventTime'] === null) { - $invalidProperties[] = "'eventTime' can't be null"; + if ($this->container['event_time'] === null) { + $invalidProperties[] = "'event_time' can't be null"; } return $invalidProperties; } @@ -217,49 +217,49 @@ public function valid() /** - * Gets campaignId + * Gets campaign_id * * @return int */ public function getCampaignId() { - return $this->container['campaignId']; + return $this->container['campaign_id']; } /** - * Sets campaignId + * Sets campaign_id * - * @param int $campaignId ID of the campaign which generated the event + * @param int $campaign_id ID of the campaign which generated the event * * @return $this */ - public function setCampaignId($campaignId) + public function setCampaignId($campaign_id) { - $this->container['campaignId'] = $campaignId; + $this->container['campaign_id'] = $campaign_id; return $this; } /** - * Gets eventTime + * Gets event_time * - * @return string + * @return \DateTime */ public function getEventTime() { - return $this->container['eventTime']; + return $this->container['event_time']; } /** - * Sets eventTime + * Sets event_time * - * @param string $eventTime UTC date-time of the event + * @param \DateTime $event_time UTC date-time of the event * * @return $this */ - public function setEventTime($eventTime) + public function setEventTime($event_time) { - $this->container['eventTime'] = $eventTime; + $this->container['event_time'] = $event_time; return $this; } @@ -270,6 +270,7 @@ public function setEventTime($eventTime) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -282,6 +283,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -295,6 +297,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -311,6 +314,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetExtendedContactDetailsStatisticsOpened.php b/lib/Model/GetExtendedContactDetailsStatisticsOpened.php index 27b159c7..1b34ebb6 100644 --- a/lib/Model/GetExtendedContactDetailsStatisticsOpened.php +++ b/lib/Model/GetExtendedContactDetailsStatisticsOpened.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -57,9 +57,9 @@ class GetExtendedContactDetailsStatisticsOpened implements ModelInterface, Array * @var string[] */ protected static $swaggerTypes = [ - 'campaignId' => 'int', + 'campaign_id' => 'int', 'count' => 'int', - 'eventTime' => 'string', + 'event_time' => '\DateTime', 'ip' => 'string' ]; @@ -69,9 +69,9 @@ class GetExtendedContactDetailsStatisticsOpened implements ModelInterface, Array * @var string[] */ protected static $swaggerFormats = [ - 'campaignId' => 'int64', + 'campaign_id' => 'int64', 'count' => 'int64', - 'eventTime' => null, + 'event_time' => 'date-time', 'ip' => null ]; @@ -102,9 +102,9 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'campaignId' => 'campaignId', + 'campaign_id' => 'campaignId', 'count' => 'count', - 'eventTime' => 'eventTime', + 'event_time' => 'eventTime', 'ip' => 'ip' ]; @@ -114,9 +114,9 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'campaignId' => 'setCampaignId', + 'campaign_id' => 'setCampaignId', 'count' => 'setCount', - 'eventTime' => 'setEventTime', + 'event_time' => 'setEventTime', 'ip' => 'setIp' ]; @@ -126,9 +126,9 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'campaignId' => 'getCampaignId', + 'campaign_id' => 'getCampaignId', 'count' => 'getCount', - 'eventTime' => 'getEventTime', + 'event_time' => 'getEventTime', 'ip' => 'getIp' ]; @@ -192,9 +192,9 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['campaignId'] = isset($data['campaignId']) ? $data['campaignId'] : null; + $this->container['campaign_id'] = isset($data['campaign_id']) ? $data['campaign_id'] : null; $this->container['count'] = isset($data['count']) ? $data['count'] : null; - $this->container['eventTime'] = isset($data['eventTime']) ? $data['eventTime'] : null; + $this->container['event_time'] = isset($data['event_time']) ? $data['event_time'] : null; $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; } @@ -207,14 +207,14 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['campaignId'] === null) { - $invalidProperties[] = "'campaignId' can't be null"; + if ($this->container['campaign_id'] === null) { + $invalidProperties[] = "'campaign_id' can't be null"; } if ($this->container['count'] === null) { $invalidProperties[] = "'count' can't be null"; } - if ($this->container['eventTime'] === null) { - $invalidProperties[] = "'eventTime' can't be null"; + if ($this->container['event_time'] === null) { + $invalidProperties[] = "'event_time' can't be null"; } if ($this->container['ip'] === null) { $invalidProperties[] = "'ip' can't be null"; @@ -235,25 +235,25 @@ public function valid() /** - * Gets campaignId + * Gets campaign_id * * @return int */ public function getCampaignId() { - return $this->container['campaignId']; + return $this->container['campaign_id']; } /** - * Sets campaignId + * Sets campaign_id * - * @param int $campaignId ID of the campaign which generated the event + * @param int $campaign_id ID of the campaign which generated the event * * @return $this */ - public function setCampaignId($campaignId) + public function setCampaignId($campaign_id) { - $this->container['campaignId'] = $campaignId; + $this->container['campaign_id'] = $campaign_id; return $this; } @@ -283,25 +283,25 @@ public function setCount($count) } /** - * Gets eventTime + * Gets event_time * - * @return string + * @return \DateTime */ public function getEventTime() { - return $this->container['eventTime']; + return $this->container['event_time']; } /** - * Sets eventTime + * Sets event_time * - * @param string $eventTime UTC date-time of the event + * @param \DateTime $event_time UTC date-time of the event * * @return $this */ - public function setEventTime($eventTime) + public function setEventTime($event_time) { - $this->container['eventTime'] = $eventTime; + $this->container['event_time'] = $event_time; return $this; } @@ -336,6 +336,7 @@ public function setIp($ip) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -348,6 +349,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -361,6 +363,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -377,6 +380,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetExtendedContactDetailsStatisticsUnsubscriptions.php b/lib/Model/GetExtendedContactDetailsStatisticsUnsubscriptions.php index b698304b..41b05810 100644 --- a/lib/Model/GetExtendedContactDetailsStatisticsUnsubscriptions.php +++ b/lib/Model/GetExtendedContactDetailsStatisticsUnsubscriptions.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -58,8 +58,8 @@ class GetExtendedContactDetailsStatisticsUnsubscriptions implements ModelInterfa * @var string[] */ protected static $swaggerTypes = [ - 'userUnsubscription' => '\SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription[]', - 'adminUnsubscription' => '\SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription[]' + 'user_unsubscription' => '\SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription[]', + 'admin_unsubscription' => '\SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription[]' ]; /** @@ -68,8 +68,8 @@ class GetExtendedContactDetailsStatisticsUnsubscriptions implements ModelInterfa * @var string[] */ protected static $swaggerFormats = [ - 'userUnsubscription' => null, - 'adminUnsubscription' => null + 'user_unsubscription' => null, + 'admin_unsubscription' => null ]; /** @@ -99,8 +99,8 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'userUnsubscription' => 'userUnsubscription', - 'adminUnsubscription' => 'adminUnsubscription' + 'user_unsubscription' => 'userUnsubscription', + 'admin_unsubscription' => 'adminUnsubscription' ]; /** @@ -109,8 +109,8 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'userUnsubscription' => 'setUserUnsubscription', - 'adminUnsubscription' => 'setAdminUnsubscription' + 'user_unsubscription' => 'setUserUnsubscription', + 'admin_unsubscription' => 'setAdminUnsubscription' ]; /** @@ -119,8 +119,8 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'userUnsubscription' => 'getUserUnsubscription', - 'adminUnsubscription' => 'getAdminUnsubscription' + 'user_unsubscription' => 'getUserUnsubscription', + 'admin_unsubscription' => 'getAdminUnsubscription' ]; /** @@ -183,8 +183,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['userUnsubscription'] = isset($data['userUnsubscription']) ? $data['userUnsubscription'] : null; - $this->container['adminUnsubscription'] = isset($data['adminUnsubscription']) ? $data['adminUnsubscription'] : null; + $this->container['user_unsubscription'] = isset($data['user_unsubscription']) ? $data['user_unsubscription'] : null; + $this->container['admin_unsubscription'] = isset($data['admin_unsubscription']) ? $data['admin_unsubscription'] : null; } /** @@ -196,11 +196,11 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['userUnsubscription'] === null) { - $invalidProperties[] = "'userUnsubscription' can't be null"; + if ($this->container['user_unsubscription'] === null) { + $invalidProperties[] = "'user_unsubscription' can't be null"; } - if ($this->container['adminUnsubscription'] === null) { - $invalidProperties[] = "'adminUnsubscription' can't be null"; + if ($this->container['admin_unsubscription'] === null) { + $invalidProperties[] = "'admin_unsubscription' can't be null"; } return $invalidProperties; } @@ -218,49 +218,49 @@ public function valid() /** - * Gets userUnsubscription + * Gets user_unsubscription * * @return \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription[] */ public function getUserUnsubscription() { - return $this->container['userUnsubscription']; + return $this->container['user_unsubscription']; } /** - * Sets userUnsubscription + * Sets user_unsubscription * - * @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription[] $userUnsubscription Contact unsubscribe via unsubscription link in a campaign + * @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription[] $user_unsubscription Contact unsubscribe via unsubscription link in a campaign * * @return $this */ - public function setUserUnsubscription($userUnsubscription) + public function setUserUnsubscription($user_unsubscription) { - $this->container['userUnsubscription'] = $userUnsubscription; + $this->container['user_unsubscription'] = $user_unsubscription; return $this; } /** - * Gets adminUnsubscription + * Gets admin_unsubscription * * @return \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription[] */ public function getAdminUnsubscription() { - return $this->container['adminUnsubscription']; + return $this->container['admin_unsubscription']; } /** - * Sets adminUnsubscription + * Sets admin_unsubscription * - * @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription[] $adminUnsubscription Contact has been unsubscribed from the administrator + * @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription[] $admin_unsubscription Contact has been unsubscribed from the administrator * * @return $this */ - public function setAdminUnsubscription($adminUnsubscription) + public function setAdminUnsubscription($admin_unsubscription) { - $this->container['adminUnsubscription'] = $adminUnsubscription; + $this->container['admin_unsubscription'] = $admin_unsubscription; return $this; } @@ -271,6 +271,7 @@ public function setAdminUnsubscription($adminUnsubscription) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -283,6 +284,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -296,6 +298,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -312,6 +315,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.php b/lib/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.php index 70f49e65..2ffd0930 100644 --- a/lib/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.php +++ b/lib/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -57,7 +57,7 @@ class GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription impl * @var string[] */ protected static $swaggerTypes = [ - 'eventTime' => 'string', + 'event_time' => '\DateTime', 'ip' => 'string' ]; @@ -67,7 +67,7 @@ class GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription impl * @var string[] */ protected static $swaggerFormats = [ - 'eventTime' => null, + 'event_time' => 'date-time', 'ip' => null ]; @@ -98,7 +98,7 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'eventTime' => 'eventTime', + 'event_time' => 'eventTime', 'ip' => 'ip' ]; @@ -108,7 +108,7 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'eventTime' => 'setEventTime', + 'event_time' => 'setEventTime', 'ip' => 'setIp' ]; @@ -118,7 +118,7 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'eventTime' => 'getEventTime', + 'event_time' => 'getEventTime', 'ip' => 'getIp' ]; @@ -182,7 +182,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['eventTime'] = isset($data['eventTime']) ? $data['eventTime'] : null; + $this->container['event_time'] = isset($data['event_time']) ? $data['event_time'] : null; $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; } @@ -195,8 +195,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['eventTime'] === null) { - $invalidProperties[] = "'eventTime' can't be null"; + if ($this->container['event_time'] === null) { + $invalidProperties[] = "'event_time' can't be null"; } return $invalidProperties; } @@ -214,25 +214,25 @@ public function valid() /** - * Gets eventTime + * Gets event_time * - * @return string + * @return \DateTime */ public function getEventTime() { - return $this->container['eventTime']; + return $this->container['event_time']; } /** - * Sets eventTime + * Sets event_time * - * @param string $eventTime UTC date-time of the event + * @param \DateTime $event_time UTC date-time of the event * * @return $this */ - public function setEventTime($eventTime) + public function setEventTime($event_time) { - $this->container['eventTime'] = $eventTime; + $this->container['event_time'] = $event_time; return $this; } @@ -267,6 +267,7 @@ public function setIp($ip) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -279,6 +280,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -292,6 +294,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -308,6 +311,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.php b/lib/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.php index 51979065..dfc6b0ed 100644 --- a/lib/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.php +++ b/lib/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -57,8 +57,8 @@ class GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription imple * @var string[] */ protected static $swaggerTypes = [ - 'campaignId' => 'int', - 'eventTime' => 'string', + 'campaign_id' => 'int', + 'event_time' => '\DateTime', 'ip' => 'string' ]; @@ -68,8 +68,8 @@ class GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription imple * @var string[] */ protected static $swaggerFormats = [ - 'campaignId' => 'int64', - 'eventTime' => null, + 'campaign_id' => 'int64', + 'event_time' => 'date-time', 'ip' => null ]; @@ -100,8 +100,8 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'campaignId' => 'campaignId', - 'eventTime' => 'eventTime', + 'campaign_id' => 'campaignId', + 'event_time' => 'eventTime', 'ip' => 'ip' ]; @@ -111,8 +111,8 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'campaignId' => 'setCampaignId', - 'eventTime' => 'setEventTime', + 'campaign_id' => 'setCampaignId', + 'event_time' => 'setEventTime', 'ip' => 'setIp' ]; @@ -122,8 +122,8 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'campaignId' => 'getCampaignId', - 'eventTime' => 'getEventTime', + 'campaign_id' => 'getCampaignId', + 'event_time' => 'getEventTime', 'ip' => 'getIp' ]; @@ -187,8 +187,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['campaignId'] = isset($data['campaignId']) ? $data['campaignId'] : null; - $this->container['eventTime'] = isset($data['eventTime']) ? $data['eventTime'] : null; + $this->container['campaign_id'] = isset($data['campaign_id']) ? $data['campaign_id'] : null; + $this->container['event_time'] = isset($data['event_time']) ? $data['event_time'] : null; $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; } @@ -201,11 +201,11 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['campaignId'] === null) { - $invalidProperties[] = "'campaignId' can't be null"; + if ($this->container['campaign_id'] === null) { + $invalidProperties[] = "'campaign_id' can't be null"; } - if ($this->container['eventTime'] === null) { - $invalidProperties[] = "'eventTime' can't be null"; + if ($this->container['event_time'] === null) { + $invalidProperties[] = "'event_time' can't be null"; } return $invalidProperties; } @@ -223,49 +223,49 @@ public function valid() /** - * Gets campaignId + * Gets campaign_id * * @return int */ public function getCampaignId() { - return $this->container['campaignId']; + return $this->container['campaign_id']; } /** - * Sets campaignId + * Sets campaign_id * - * @param int $campaignId ID of the campaign which generated the event + * @param int $campaign_id ID of the campaign which generated the event * * @return $this */ - public function setCampaignId($campaignId) + public function setCampaignId($campaign_id) { - $this->container['campaignId'] = $campaignId; + $this->container['campaign_id'] = $campaign_id; return $this; } /** - * Gets eventTime + * Gets event_time * - * @return string + * @return \DateTime */ public function getEventTime() { - return $this->container['eventTime']; + return $this->container['event_time']; } /** - * Sets eventTime + * Sets event_time * - * @param string $eventTime UTC date-time of the event + * @param \DateTime $event_time UTC date-time of the event * * @return $this */ - public function setEventTime($eventTime) + public function setEventTime($event_time) { - $this->container['eventTime'] = $eventTime; + $this->container['event_time'] = $event_time; return $this; } @@ -300,6 +300,7 @@ public function setIp($ip) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -312,6 +313,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -325,6 +327,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -341,6 +344,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetExtendedList.php b/lib/Model/GetExtendedList.php index 77927ab0..ace5437e 100644 --- a/lib/Model/GetExtendedList.php +++ b/lib/Model/GetExtendedList.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -55,10 +55,10 @@ class GetExtendedList extends GetList * @var string[] */ protected static $swaggerTypes = [ - 'folderId' => 'int', - 'createdAt' => 'string', - 'campaignStats' => '\SendinBlue\Client\Model\GetExtendedListCampaignStats[]', - 'dynamicList' => 'bool' + 'folder_id' => 'int', + 'created_at' => '\DateTime', + 'campaign_stats' => '\SendinBlue\Client\Model\GetExtendedListCampaignStats[]', + 'dynamic_list' => 'bool' ]; /** @@ -67,10 +67,10 @@ class GetExtendedList extends GetList * @var string[] */ protected static $swaggerFormats = [ - 'folderId' => 'int64', - 'createdAt' => null, - 'campaignStats' => null, - 'dynamicList' => null + 'folder_id' => 'int64', + 'created_at' => 'date-time', + 'campaign_stats' => null, + 'dynamic_list' => null ]; /** @@ -100,10 +100,10 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'folderId' => 'folderId', - 'createdAt' => 'createdAt', - 'campaignStats' => 'campaignStats', - 'dynamicList' => 'dynamicList' + 'folder_id' => 'folderId', + 'created_at' => 'createdAt', + 'campaign_stats' => 'campaignStats', + 'dynamic_list' => 'dynamicList' ]; /** @@ -112,10 +112,10 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'folderId' => 'setFolderId', - 'createdAt' => 'setCreatedAt', - 'campaignStats' => 'setCampaignStats', - 'dynamicList' => 'setDynamicList' + 'folder_id' => 'setFolderId', + 'created_at' => 'setCreatedAt', + 'campaign_stats' => 'setCampaignStats', + 'dynamic_list' => 'setDynamicList' ]; /** @@ -124,10 +124,10 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'folderId' => 'getFolderId', - 'createdAt' => 'getCreatedAt', - 'campaignStats' => 'getCampaignStats', - 'dynamicList' => 'getDynamicList' + 'folder_id' => 'getFolderId', + 'created_at' => 'getCreatedAt', + 'campaign_stats' => 'getCampaignStats', + 'dynamic_list' => 'getDynamicList' ]; /** @@ -186,10 +186,10 @@ public function __construct(array $data = null) { parent::__construct($data); - $this->container['folderId'] = isset($data['folderId']) ? $data['folderId'] : null; - $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; - $this->container['campaignStats'] = isset($data['campaignStats']) ? $data['campaignStats'] : null; - $this->container['dynamicList'] = isset($data['dynamicList']) ? $data['dynamicList'] : null; + $this->container['folder_id'] = isset($data['folder_id']) ? $data['folder_id'] : null; + $this->container['created_at'] = isset($data['created_at']) ? $data['created_at'] : null; + $this->container['campaign_stats'] = isset($data['campaign_stats']) ? $data['campaign_stats'] : null; + $this->container['dynamic_list'] = isset($data['dynamic_list']) ? $data['dynamic_list'] : null; } /** @@ -201,11 +201,11 @@ public function listInvalidProperties() { $invalidProperties = parent::listInvalidProperties(); - if ($this->container['folderId'] === null) { - $invalidProperties[] = "'folderId' can't be null"; + if ($this->container['folder_id'] === null) { + $invalidProperties[] = "'folder_id' can't be null"; } - if ($this->container['createdAt'] === null) { - $invalidProperties[] = "'createdAt' can't be null"; + if ($this->container['created_at'] === null) { + $invalidProperties[] = "'created_at' can't be null"; } return $invalidProperties; } @@ -223,97 +223,97 @@ public function valid() /** - * Gets folderId + * Gets folder_id * * @return int */ public function getFolderId() { - return $this->container['folderId']; + return $this->container['folder_id']; } /** - * Sets folderId + * Sets folder_id * - * @param int $folderId ID of the folder + * @param int $folder_id ID of the folder * * @return $this */ - public function setFolderId($folderId) + public function setFolderId($folder_id) { - $this->container['folderId'] = $folderId; + $this->container['folder_id'] = $folder_id; return $this; } /** - * Gets createdAt + * Gets created_at * - * @return string + * @return \DateTime */ public function getCreatedAt() { - return $this->container['createdAt']; + return $this->container['created_at']; } /** - * Sets createdAt + * Sets created_at * - * @param string $createdAt Creation UTC date-time of the list (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @param \DateTime $created_at Creation UTC date-time of the list (YYYY-MM-DDTHH:mm:ss.SSSZ) * * @return $this */ - public function setCreatedAt($createdAt) + public function setCreatedAt($created_at) { - $this->container['createdAt'] = $createdAt; + $this->container['created_at'] = $created_at; return $this; } /** - * Gets campaignStats + * Gets campaign_stats * * @return \SendinBlue\Client\Model\GetExtendedListCampaignStats[] */ public function getCampaignStats() { - return $this->container['campaignStats']; + return $this->container['campaign_stats']; } /** - * Sets campaignStats + * Sets campaign_stats * - * @param \SendinBlue\Client\Model\GetExtendedListCampaignStats[] $campaignStats campaignStats + * @param \SendinBlue\Client\Model\GetExtendedListCampaignStats[] $campaign_stats campaign_stats * * @return $this */ - public function setCampaignStats($campaignStats) + public function setCampaignStats($campaign_stats) { - $this->container['campaignStats'] = $campaignStats; + $this->container['campaign_stats'] = $campaign_stats; return $this; } /** - * Gets dynamicList + * Gets dynamic_list * * @return bool */ public function getDynamicList() { - return $this->container['dynamicList']; + return $this->container['dynamic_list']; } /** - * Sets dynamicList + * Sets dynamic_list * - * @param bool $dynamicList Status telling if the list is dynamic or not (true=dynamic, false=not dynamic) + * @param bool $dynamic_list Status telling if the list is dynamic or not (true=dynamic, false=not dynamic) * * @return $this */ - public function setDynamicList($dynamicList) + public function setDynamicList($dynamic_list) { - $this->container['dynamicList'] = $dynamicList; + $this->container['dynamic_list'] = $dynamic_list; return $this; } @@ -324,6 +324,7 @@ public function setDynamicList($dynamicList) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -336,6 +337,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -349,6 +351,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -365,6 +368,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetExtendedListCampaignStats.php b/lib/Model/GetExtendedListCampaignStats.php index 5281f5f0..46ef1bc1 100644 --- a/lib/Model/GetExtendedListCampaignStats.php +++ b/lib/Model/GetExtendedListCampaignStats.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -57,7 +57,7 @@ class GetExtendedListCampaignStats implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'campaignId' => 'int', + 'campaign_id' => 'int', 'stats' => '\SendinBlue\Client\Model\GetCampaignStats' ]; @@ -67,7 +67,7 @@ class GetExtendedListCampaignStats implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'campaignId' => 'int64', + 'campaign_id' => 'int64', 'stats' => null ]; @@ -98,7 +98,7 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'campaignId' => 'campaignId', + 'campaign_id' => 'campaignId', 'stats' => 'stats' ]; @@ -108,7 +108,7 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'campaignId' => 'setCampaignId', + 'campaign_id' => 'setCampaignId', 'stats' => 'setStats' ]; @@ -118,7 +118,7 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'campaignId' => 'getCampaignId', + 'campaign_id' => 'getCampaignId', 'stats' => 'getStats' ]; @@ -182,7 +182,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['campaignId'] = isset($data['campaignId']) ? $data['campaignId'] : null; + $this->container['campaign_id'] = isset($data['campaign_id']) ? $data['campaign_id'] : null; $this->container['stats'] = isset($data['stats']) ? $data['stats'] : null; } @@ -195,8 +195,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['campaignId'] === null) { - $invalidProperties[] = "'campaignId' can't be null"; + if ($this->container['campaign_id'] === null) { + $invalidProperties[] = "'campaign_id' can't be null"; } if ($this->container['stats'] === null) { $invalidProperties[] = "'stats' can't be null"; @@ -217,25 +217,25 @@ public function valid() /** - * Gets campaignId + * Gets campaign_id * * @return int */ public function getCampaignId() { - return $this->container['campaignId']; + return $this->container['campaign_id']; } /** - * Sets campaignId + * Sets campaign_id * - * @param int $campaignId ID of the campaign + * @param int $campaign_id ID of the campaign * * @return $this */ - public function setCampaignId($campaignId) + public function setCampaignId($campaign_id) { - $this->container['campaignId'] = $campaignId; + $this->container['campaign_id'] = $campaign_id; return $this; } @@ -270,6 +270,7 @@ public function setStats($stats) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -282,6 +283,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -295,6 +297,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -311,6 +314,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetFolder.php b/lib/Model/GetFolder.php index 060161f9..8d341f61 100644 --- a/lib/Model/GetFolder.php +++ b/lib/Model/GetFolder.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -59,9 +59,9 @@ class GetFolder implements ModelInterface, ArrayAccess protected static $swaggerTypes = [ 'id' => 'int', 'name' => 'string', - 'totalBlacklisted' => 'int', - 'totalSubscribers' => 'int', - 'uniqueSubscribers' => 'int' + 'total_blacklisted' => 'int', + 'total_subscribers' => 'int', + 'unique_subscribers' => 'int' ]; /** @@ -72,9 +72,9 @@ class GetFolder implements ModelInterface, ArrayAccess protected static $swaggerFormats = [ 'id' => 'int64', 'name' => null, - 'totalBlacklisted' => 'int64', - 'totalSubscribers' => 'int64', - 'uniqueSubscribers' => 'int64' + 'total_blacklisted' => 'int64', + 'total_subscribers' => 'int64', + 'unique_subscribers' => 'int64' ]; /** @@ -106,9 +106,9 @@ public static function swaggerFormats() protected static $attributeMap = [ 'id' => 'id', 'name' => 'name', - 'totalBlacklisted' => 'totalBlacklisted', - 'totalSubscribers' => 'totalSubscribers', - 'uniqueSubscribers' => 'uniqueSubscribers' + 'total_blacklisted' => 'totalBlacklisted', + 'total_subscribers' => 'totalSubscribers', + 'unique_subscribers' => 'uniqueSubscribers' ]; /** @@ -119,9 +119,9 @@ public static function swaggerFormats() protected static $setters = [ 'id' => 'setId', 'name' => 'setName', - 'totalBlacklisted' => 'setTotalBlacklisted', - 'totalSubscribers' => 'setTotalSubscribers', - 'uniqueSubscribers' => 'setUniqueSubscribers' + 'total_blacklisted' => 'setTotalBlacklisted', + 'total_subscribers' => 'setTotalSubscribers', + 'unique_subscribers' => 'setUniqueSubscribers' ]; /** @@ -132,9 +132,9 @@ public static function swaggerFormats() protected static $getters = [ 'id' => 'getId', 'name' => 'getName', - 'totalBlacklisted' => 'getTotalBlacklisted', - 'totalSubscribers' => 'getTotalSubscribers', - 'uniqueSubscribers' => 'getUniqueSubscribers' + 'total_blacklisted' => 'getTotalBlacklisted', + 'total_subscribers' => 'getTotalSubscribers', + 'unique_subscribers' => 'getUniqueSubscribers' ]; /** @@ -199,9 +199,9 @@ public function __construct(array $data = null) { $this->container['id'] = isset($data['id']) ? $data['id'] : null; $this->container['name'] = isset($data['name']) ? $data['name'] : null; - $this->container['totalBlacklisted'] = isset($data['totalBlacklisted']) ? $data['totalBlacklisted'] : null; - $this->container['totalSubscribers'] = isset($data['totalSubscribers']) ? $data['totalSubscribers'] : null; - $this->container['uniqueSubscribers'] = isset($data['uniqueSubscribers']) ? $data['uniqueSubscribers'] : null; + $this->container['total_blacklisted'] = isset($data['total_blacklisted']) ? $data['total_blacklisted'] : null; + $this->container['total_subscribers'] = isset($data['total_subscribers']) ? $data['total_subscribers'] : null; + $this->container['unique_subscribers'] = isset($data['unique_subscribers']) ? $data['unique_subscribers'] : null; } /** @@ -219,14 +219,14 @@ public function listInvalidProperties() if ($this->container['name'] === null) { $invalidProperties[] = "'name' can't be null"; } - if ($this->container['totalBlacklisted'] === null) { - $invalidProperties[] = "'totalBlacklisted' can't be null"; + if ($this->container['total_blacklisted'] === null) { + $invalidProperties[] = "'total_blacklisted' can't be null"; } - if ($this->container['totalSubscribers'] === null) { - $invalidProperties[] = "'totalSubscribers' can't be null"; + if ($this->container['total_subscribers'] === null) { + $invalidProperties[] = "'total_subscribers' can't be null"; } - if ($this->container['uniqueSubscribers'] === null) { - $invalidProperties[] = "'uniqueSubscribers' can't be null"; + if ($this->container['unique_subscribers'] === null) { + $invalidProperties[] = "'unique_subscribers' can't be null"; } return $invalidProperties; } @@ -292,73 +292,73 @@ public function setName($name) } /** - * Gets totalBlacklisted + * Gets total_blacklisted * * @return int */ public function getTotalBlacklisted() { - return $this->container['totalBlacklisted']; + return $this->container['total_blacklisted']; } /** - * Sets totalBlacklisted + * Sets total_blacklisted * - * @param int $totalBlacklisted Number of blacklisted contacts in the folder + * @param int $total_blacklisted Number of blacklisted contacts in the folder * * @return $this */ - public function setTotalBlacklisted($totalBlacklisted) + public function setTotalBlacklisted($total_blacklisted) { - $this->container['totalBlacklisted'] = $totalBlacklisted; + $this->container['total_blacklisted'] = $total_blacklisted; return $this; } /** - * Gets totalSubscribers + * Gets total_subscribers * * @return int */ public function getTotalSubscribers() { - return $this->container['totalSubscribers']; + return $this->container['total_subscribers']; } /** - * Sets totalSubscribers + * Sets total_subscribers * - * @param int $totalSubscribers Number of contacts in the folder + * @param int $total_subscribers Number of contacts in the folder * * @return $this */ - public function setTotalSubscribers($totalSubscribers) + public function setTotalSubscribers($total_subscribers) { - $this->container['totalSubscribers'] = $totalSubscribers; + $this->container['total_subscribers'] = $total_subscribers; return $this; } /** - * Gets uniqueSubscribers + * Gets unique_subscribers * * @return int */ public function getUniqueSubscribers() { - return $this->container['uniqueSubscribers']; + return $this->container['unique_subscribers']; } /** - * Sets uniqueSubscribers + * Sets unique_subscribers * - * @param int $uniqueSubscribers Number of unique contacts in the folder + * @param int $unique_subscribers Number of unique contacts in the folder * * @return $this */ - public function setUniqueSubscribers($uniqueSubscribers) + public function setUniqueSubscribers($unique_subscribers) { - $this->container['uniqueSubscribers'] = $uniqueSubscribers; + $this->container['unique_subscribers'] = $unique_subscribers; return $this; } @@ -369,6 +369,7 @@ public function setUniqueSubscribers($uniqueSubscribers) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -381,6 +382,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -394,6 +396,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -410,6 +413,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetFolderLists.php b/lib/Model/GetFolderLists.php index 33069ef7..9ec43da0 100644 --- a/lib/Model/GetFolderLists.php +++ b/lib/Model/GetFolderLists.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -195,6 +195,12 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['lists'] === null) { + $invalidProperties[] = "'lists' can't be null"; + } + if ($this->container['count'] === null) { + $invalidProperties[] = "'count' can't be null"; + } return $invalidProperties; } @@ -264,6 +270,7 @@ public function setCount($count) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -276,6 +283,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -289,6 +297,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -305,6 +314,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetFolders.php b/lib/Model/GetFolders.php index e4355221..805c62ac 100644 --- a/lib/Model/GetFolders.php +++ b/lib/Model/GetFolders.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -264,6 +264,7 @@ public function setCount($count) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -276,6 +277,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -289,6 +291,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -305,6 +308,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetInboundEmailEvents.php b/lib/Model/GetInboundEmailEvents.php deleted file mode 100644 index 0bbcfcf8..00000000 --- a/lib/Model/GetInboundEmailEvents.php +++ /dev/null @@ -1,301 +0,0 @@ - '\SendinBlue\Client\Model\GetInboundEmailEventsEvents[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'events' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'events' => 'events' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'events' => 'setEvents' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'events' => 'getEvents' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['events'] = isset($data['events']) ? $data['events'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets events - * - * @return \SendinBlue\Client\Model\GetInboundEmailEventsEvents[] - */ - public function getEvents() - { - return $this->container['events']; - } - - /** - * Sets events - * - * @param \SendinBlue\Client\Model\GetInboundEmailEventsEvents[] $events events - * - * @return $this - */ - public function setEvents($events) - { - $this->container['events'] = $events; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/GetInboundEmailEventsByUuid.php b/lib/Model/GetInboundEmailEventsByUuid.php deleted file mode 100644 index 74940bd1..00000000 --- a/lib/Model/GetInboundEmailEventsByUuid.php +++ /dev/null @@ -1,511 +0,0 @@ - '\DateTime', - 'deliveredAt' => '\DateTime', - 'recipient' => 'string', - 'sender' => 'string', - 'messageId' => 'string', - 'subject' => 'string', - 'attachments' => '\SendinBlue\Client\Model\GetInboundEmailEventsByUuidAttachments[]', - 'logs' => '\SendinBlue\Client\Model\GetInboundEmailEventsByUuidLogs[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'receivedAt' => 'date-time', - 'deliveredAt' => 'date-time', - 'recipient' => 'email', - 'sender' => 'email', - 'messageId' => null, - 'subject' => null, - 'attachments' => null, - 'logs' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'receivedAt' => 'receivedAt', - 'deliveredAt' => 'deliveredAt', - 'recipient' => 'recipient', - 'sender' => 'sender', - 'messageId' => 'messageId', - 'subject' => 'subject', - 'attachments' => 'attachments', - 'logs' => 'logs' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'receivedAt' => 'setReceivedAt', - 'deliveredAt' => 'setDeliveredAt', - 'recipient' => 'setRecipient', - 'sender' => 'setSender', - 'messageId' => 'setMessageId', - 'subject' => 'setSubject', - 'attachments' => 'setAttachments', - 'logs' => 'setLogs' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'receivedAt' => 'getReceivedAt', - 'deliveredAt' => 'getDeliveredAt', - 'recipient' => 'getRecipient', - 'sender' => 'getSender', - 'messageId' => 'getMessageId', - 'subject' => 'getSubject', - 'attachments' => 'getAttachments', - 'logs' => 'getLogs' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['receivedAt'] = isset($data['receivedAt']) ? $data['receivedAt'] : null; - $this->container['deliveredAt'] = isset($data['deliveredAt']) ? $data['deliveredAt'] : null; - $this->container['recipient'] = isset($data['recipient']) ? $data['recipient'] : null; - $this->container['sender'] = isset($data['sender']) ? $data['sender'] : null; - $this->container['messageId'] = isset($data['messageId']) ? $data['messageId'] : null; - $this->container['subject'] = isset($data['subject']) ? $data['subject'] : null; - $this->container['attachments'] = isset($data['attachments']) ? $data['attachments'] : null; - $this->container['logs'] = isset($data['logs']) ? $data['logs'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets receivedAt - * - * @return \DateTime - */ - public function getReceivedAt() - { - return $this->container['receivedAt']; - } - - /** - * Sets receivedAt - * - * @param \DateTime $receivedAt Date when email was received on SMTP relay - * - * @return $this - */ - public function setReceivedAt($receivedAt) - { - $this->container['receivedAt'] = $receivedAt; - - return $this; - } - - /** - * Gets deliveredAt - * - * @return \DateTime - */ - public function getDeliveredAt() - { - return $this->container['deliveredAt']; - } - - /** - * Sets deliveredAt - * - * @param \DateTime $deliveredAt Date when email was delivered successfully to client’s webhook - * - * @return $this - */ - public function setDeliveredAt($deliveredAt) - { - $this->container['deliveredAt'] = $deliveredAt; - - return $this; - } - - /** - * Gets recipient - * - * @return string - */ - public function getRecipient() - { - return $this->container['recipient']; - } - - /** - * Sets recipient - * - * @param string $recipient Recipient’s email address - * - * @return $this - */ - public function setRecipient($recipient) - { - $this->container['recipient'] = $recipient; - - return $this; - } - - /** - * Gets sender - * - * @return string - */ - public function getSender() - { - return $this->container['sender']; - } - - /** - * Sets sender - * - * @param string $sender Sender’s email address - * - * @return $this - */ - public function setSender($sender) - { - $this->container['sender'] = $sender; - - return $this; - } - - /** - * Gets messageId - * - * @return string - */ - public function getMessageId() - { - return $this->container['messageId']; - } - - /** - * Sets messageId - * - * @param string $messageId Value of the Message-ID header. This will be present only after the processing is done. - * - * @return $this - */ - public function setMessageId($messageId) - { - $this->container['messageId'] = $messageId; - - return $this; - } - - /** - * Gets subject - * - * @return string - */ - public function getSubject() - { - return $this->container['subject']; - } - - /** - * Sets subject - * - * @param string $subject Value of the Subject header. This will be present only after the processing is done. - * - * @return $this - */ - public function setSubject($subject) - { - $this->container['subject'] = $subject; - - return $this; - } - - /** - * Gets attachments - * - * @return \SendinBlue\Client\Model\GetInboundEmailEventsByUuidAttachments[] - */ - public function getAttachments() - { - return $this->container['attachments']; - } - - /** - * Sets attachments - * - * @param \SendinBlue\Client\Model\GetInboundEmailEventsByUuidAttachments[] $attachments List of attachments of the email. This will be present only after the processing is done. - * - * @return $this - */ - public function setAttachments($attachments) - { - $this->container['attachments'] = $attachments; - - return $this; - } - - /** - * Gets logs - * - * @return \SendinBlue\Client\Model\GetInboundEmailEventsByUuidLogs[] - */ - public function getLogs() - { - return $this->container['logs']; - } - - /** - * Sets logs - * - * @param \SendinBlue\Client\Model\GetInboundEmailEventsByUuidLogs[] $logs List of events/logs that describe the lifecycle of the email on SIB platform - * - * @return $this - */ - public function setLogs($logs) - { - $this->container['logs'] = $logs; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/GetInboundEmailEventsByUuidAttachments.php b/lib/Model/GetInboundEmailEventsByUuidAttachments.php deleted file mode 100644 index aadf5a91..00000000 --- a/lib/Model/GetInboundEmailEventsByUuidAttachments.php +++ /dev/null @@ -1,391 +0,0 @@ - 'string', - 'contentType' => 'string', - 'contentId' => 'string', - 'contentLength' => 'int' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'name' => null, - 'contentType' => null, - 'contentId' => null, - 'contentLength' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'name' => 'name', - 'contentType' => 'contentType', - 'contentId' => 'contentId', - 'contentLength' => 'contentLength' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'name' => 'setName', - 'contentType' => 'setContentType', - 'contentId' => 'setContentId', - 'contentLength' => 'setContentLength' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'name' => 'getName', - 'contentType' => 'getContentType', - 'contentId' => 'getContentId', - 'contentLength' => 'getContentLength' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - $this->container['contentType'] = isset($data['contentType']) ? $data['contentType'] : null; - $this->container['contentId'] = isset($data['contentId']) ? $data['contentId'] : null; - $this->container['contentLength'] = isset($data['contentLength']) ? $data['contentLength'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name filename specified in the Content-Disposition header of the attachment - * - * @return $this - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets contentType - * - * @return string - */ - public function getContentType() - { - return $this->container['contentType']; - } - - /** - * Sets contentType - * - * @param string $contentType value of the Content-Type header of the attachment - * - * @return $this - */ - public function setContentType($contentType) - { - $this->container['contentType'] = $contentType; - - return $this; - } - - /** - * Gets contentId - * - * @return string - */ - public function getContentId() - { - return $this->container['contentId']; - } - - /** - * Sets contentId - * - * @param string $contentId value of the Content-ID header of the attachment. - * - * @return $this - */ - public function setContentId($contentId) - { - $this->container['contentId'] = $contentId; - - return $this; - } - - /** - * Gets contentLength - * - * @return int - */ - public function getContentLength() - { - return $this->container['contentLength']; - } - - /** - * Sets contentLength - * - * @param int $contentLength size of the attachment in bytes - * - * @return $this - */ - public function setContentLength($contentLength) - { - $this->container['contentLength'] = $contentLength; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/GetInboundEmailEventsByUuidLogs.php b/lib/Model/GetInboundEmailEventsByUuidLogs.php deleted file mode 100644 index dad7fbbe..00000000 --- a/lib/Model/GetInboundEmailEventsByUuidLogs.php +++ /dev/null @@ -1,367 +0,0 @@ - '\DateTime', - 'type' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'date' => 'date-time', - 'type' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'date' => 'date', - 'type' => 'type' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'date' => 'setDate', - 'type' => 'setType' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'date' => 'getDate', - 'type' => 'getType' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - const TYPE_RECEIVED = 'received'; - const TYPE_PROCESSED = 'processed'; - const TYPE_WEBHOOK_FAILED = 'webhookFailed'; - const TYPE_WEBHOOK_DELIVERED = 'webhookDelivered'; - - - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTypeAllowableValues() - { - return [ - self::TYPE_RECEIVED, - self::TYPE_PROCESSED, - self::TYPE_WEBHOOK_FAILED, - self::TYPE_WEBHOOK_DELIVERED, - ]; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['date'] = isset($data['date']) ? $data['date'] : null; - $this->container['type'] = isset($data['type']) ? $data['type'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value for 'type', must be one of '%s'", - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets date - * - * @return \DateTime - */ - public function getDate() - { - return $this->container['date']; - } - - /** - * Sets date - * - * @param \DateTime $date Date of the event - * - * @return $this - */ - public function setDate($date) - { - $this->container['date'] = $date; - - return $this; - } - - /** - * Gets type - * - * @return string - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string $type Type of the event - * - * @return $this - */ - public function setType($type) - { - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($type) && !in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value for 'type', must be one of '%s'", - implode("', '", $allowedValues) - ) - ); - } - $this->container['type'] = $type; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/GetInboundEmailEventsEvents.php b/lib/Model/GetInboundEmailEventsEvents.php deleted file mode 100644 index 4206a0da..00000000 --- a/lib/Model/GetInboundEmailEventsEvents.php +++ /dev/null @@ -1,403 +0,0 @@ - 'string', - 'date' => '\DateTime', - 'sender' => 'string', - 'recipient' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'uuid' => 'uuid', - 'date' => 'date-time', - 'sender' => 'email', - 'recipient' => 'email' - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'uuid' => 'uuid', - 'date' => 'date', - 'sender' => 'sender', - 'recipient' => 'recipient' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'uuid' => 'setUuid', - 'date' => 'setDate', - 'sender' => 'setSender', - 'recipient' => 'setRecipient' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'uuid' => 'getUuid', - 'date' => 'getDate', - 'sender' => 'getSender', - 'recipient' => 'getRecipient' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['uuid'] = isset($data['uuid']) ? $data['uuid'] : null; - $this->container['date'] = isset($data['date']) ? $data['date'] : null; - $this->container['sender'] = isset($data['sender']) ? $data['sender'] : null; - $this->container['recipient'] = isset($data['recipient']) ? $data['recipient'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['uuid'] === null) { - $invalidProperties[] = "'uuid' can't be null"; - } - if ($this->container['date'] === null) { - $invalidProperties[] = "'date' can't be null"; - } - if ($this->container['sender'] === null) { - $invalidProperties[] = "'sender' can't be null"; - } - if ($this->container['recipient'] === null) { - $invalidProperties[] = "'recipient' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets uuid - * - * @return string - */ - public function getUuid() - { - return $this->container['uuid']; - } - - /** - * Sets uuid - * - * @param string $uuid UUID that can be used to fetch additional data - * - * @return $this - */ - public function setUuid($uuid) - { - $this->container['uuid'] = $uuid; - - return $this; - } - - /** - * Gets date - * - * @return \DateTime - */ - public function getDate() - { - return $this->container['date']; - } - - /** - * Sets date - * - * @param \DateTime $date Date when email was received on SMTP relay - * - * @return $this - */ - public function setDate($date) - { - $this->container['date'] = $date; - - return $this; - } - - /** - * Gets sender - * - * @return string - */ - public function getSender() - { - return $this->container['sender']; - } - - /** - * Sets sender - * - * @param string $sender Sender’s email address - * - * @return $this - */ - public function setSender($sender) - { - $this->container['sender'] = $sender; - - return $this; - } - - /** - * Gets recipient - * - * @return string - */ - public function getRecipient() - { - return $this->container['recipient']; - } - - /** - * Sets recipient - * - * @param string $recipient Recipient’s email address - * - * @return $this - */ - public function setRecipient($recipient) - { - $this->container['recipient'] = $recipient; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/GetIp.php b/lib/Model/GetIp.php index a17d0573..5eee02ff 100644 --- a/lib/Model/GetIp.php +++ b/lib/Model/GetIp.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -336,6 +336,7 @@ public function setDomain($domain) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -348,6 +349,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -361,6 +363,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -377,6 +380,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetIpFromSender.php b/lib/Model/GetIpFromSender.php index 962ba8b8..045ee48f 100644 --- a/lib/Model/GetIpFromSender.php +++ b/lib/Model/GetIpFromSender.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -336,6 +336,7 @@ public function setWeight($weight) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -348,6 +349,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -361,6 +363,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -377,6 +380,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetIps.php b/lib/Model/GetIps.php index ae54bc24..b8a90b78 100644 --- a/lib/Model/GetIps.php +++ b/lib/Model/GetIps.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -237,6 +237,7 @@ public function setIps($ips) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -249,6 +250,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -262,6 +264,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -278,6 +281,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetIpsFromSender.php b/lib/Model/GetIpsFromSender.php index 694e6102..ec4769fc 100644 --- a/lib/Model/GetIpsFromSender.php +++ b/lib/Model/GetIpsFromSender.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -237,6 +237,7 @@ public function setIps($ips) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -249,6 +250,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -262,6 +264,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -278,6 +281,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetList.php b/lib/Model/GetList.php index f09ac786..581d8cdc 100644 --- a/lib/Model/GetList.php +++ b/lib/Model/GetList.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -59,9 +59,8 @@ class GetList implements ModelInterface, ArrayAccess protected static $swaggerTypes = [ 'id' => 'int', 'name' => 'string', - 'totalBlacklisted' => 'int', - 'totalSubscribers' => 'int', - 'uniqueSubscribers' => 'int' + 'total_blacklisted' => 'int', + 'total_subscribers' => 'int' ]; /** @@ -72,9 +71,8 @@ class GetList implements ModelInterface, ArrayAccess protected static $swaggerFormats = [ 'id' => 'int64', 'name' => null, - 'totalBlacklisted' => 'int64', - 'totalSubscribers' => 'int64', - 'uniqueSubscribers' => 'int64' + 'total_blacklisted' => 'int64', + 'total_subscribers' => 'int64' ]; /** @@ -106,9 +104,8 @@ public static function swaggerFormats() protected static $attributeMap = [ 'id' => 'id', 'name' => 'name', - 'totalBlacklisted' => 'totalBlacklisted', - 'totalSubscribers' => 'totalSubscribers', - 'uniqueSubscribers' => 'uniqueSubscribers' + 'total_blacklisted' => 'totalBlacklisted', + 'total_subscribers' => 'totalSubscribers' ]; /** @@ -119,9 +116,8 @@ public static function swaggerFormats() protected static $setters = [ 'id' => 'setId', 'name' => 'setName', - 'totalBlacklisted' => 'setTotalBlacklisted', - 'totalSubscribers' => 'setTotalSubscribers', - 'uniqueSubscribers' => 'setUniqueSubscribers' + 'total_blacklisted' => 'setTotalBlacklisted', + 'total_subscribers' => 'setTotalSubscribers' ]; /** @@ -132,9 +128,8 @@ public static function swaggerFormats() protected static $getters = [ 'id' => 'getId', 'name' => 'getName', - 'totalBlacklisted' => 'getTotalBlacklisted', - 'totalSubscribers' => 'getTotalSubscribers', - 'uniqueSubscribers' => 'getUniqueSubscribers' + 'total_blacklisted' => 'getTotalBlacklisted', + 'total_subscribers' => 'getTotalSubscribers' ]; /** @@ -199,9 +194,8 @@ public function __construct(array $data = null) { $this->container['id'] = isset($data['id']) ? $data['id'] : null; $this->container['name'] = isset($data['name']) ? $data['name'] : null; - $this->container['totalBlacklisted'] = isset($data['totalBlacklisted']) ? $data['totalBlacklisted'] : null; - $this->container['totalSubscribers'] = isset($data['totalSubscribers']) ? $data['totalSubscribers'] : null; - $this->container['uniqueSubscribers'] = isset($data['uniqueSubscribers']) ? $data['uniqueSubscribers'] : null; + $this->container['total_blacklisted'] = isset($data['total_blacklisted']) ? $data['total_blacklisted'] : null; + $this->container['total_subscribers'] = isset($data['total_subscribers']) ? $data['total_subscribers'] : null; } /** @@ -219,14 +213,11 @@ public function listInvalidProperties() if ($this->container['name'] === null) { $invalidProperties[] = "'name' can't be null"; } - if ($this->container['totalBlacklisted'] === null) { - $invalidProperties[] = "'totalBlacklisted' can't be null"; + if ($this->container['total_blacklisted'] === null) { + $invalidProperties[] = "'total_blacklisted' can't be null"; } - if ($this->container['totalSubscribers'] === null) { - $invalidProperties[] = "'totalSubscribers' can't be null"; - } - if ($this->container['uniqueSubscribers'] === null) { - $invalidProperties[] = "'uniqueSubscribers' can't be null"; + if ($this->container['total_subscribers'] === null) { + $invalidProperties[] = "'total_subscribers' can't be null"; } return $invalidProperties; } @@ -292,73 +283,49 @@ public function setName($name) } /** - * Gets totalBlacklisted + * Gets total_blacklisted * * @return int */ public function getTotalBlacklisted() { - return $this->container['totalBlacklisted']; + return $this->container['total_blacklisted']; } /** - * Sets totalBlacklisted + * Sets total_blacklisted * - * @param int $totalBlacklisted Number of blacklisted contacts in the list + * @param int $total_blacklisted Number of blacklisted contacts in the list * * @return $this */ - public function setTotalBlacklisted($totalBlacklisted) + public function setTotalBlacklisted($total_blacklisted) { - $this->container['totalBlacklisted'] = $totalBlacklisted; + $this->container['total_blacklisted'] = $total_blacklisted; return $this; } /** - * Gets totalSubscribers + * Gets total_subscribers * * @return int */ public function getTotalSubscribers() { - return $this->container['totalSubscribers']; - } - - /** - * Sets totalSubscribers - * - * @param int $totalSubscribers Number of contacts in the list - * - * @return $this - */ - public function setTotalSubscribers($totalSubscribers) - { - $this->container['totalSubscribers'] = $totalSubscribers; - - return $this; - } - - /** - * Gets uniqueSubscribers - * - * @return int - */ - public function getUniqueSubscribers() - { - return $this->container['uniqueSubscribers']; + return $this->container['total_subscribers']; } /** - * Sets uniqueSubscribers + * Sets total_subscribers * - * @param int $uniqueSubscribers Number of unique contacts in the list + * @param int $total_subscribers Number of contacts in the list * * @return $this */ - public function setUniqueSubscribers($uniqueSubscribers) + public function setTotalSubscribers($total_subscribers) { - $this->container['uniqueSubscribers'] = $uniqueSubscribers; + $this->container['total_subscribers'] = $total_subscribers; return $this; } @@ -369,6 +336,7 @@ public function setUniqueSubscribers($uniqueSubscribers) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -381,6 +349,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -394,6 +363,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -410,6 +380,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetLists.php b/lib/Model/GetLists.php index cea44aba..de695bb6 100644 --- a/lib/Model/GetLists.php +++ b/lib/Model/GetLists.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -195,6 +195,12 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['lists'] === null) { + $invalidProperties[] = "'lists' can't be null"; + } + if ($this->container['count'] === null) { + $invalidProperties[] = "'count' can't be null"; + } return $invalidProperties; } @@ -264,6 +270,7 @@ public function setCount($count) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -276,6 +283,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -289,6 +297,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -305,6 +314,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetProcess.php b/lib/Model/GetProcess.php index d44187d2..ecf35de5 100644 --- a/lib/Model/GetProcess.php +++ b/lib/Model/GetProcess.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -60,7 +60,7 @@ class GetProcess implements ModelInterface, ArrayAccess 'id' => 'int', 'status' => 'string', 'name' => 'string', - 'exportUrl' => 'string' + 'export_url' => 'string' ]; /** @@ -72,7 +72,7 @@ class GetProcess implements ModelInterface, ArrayAccess 'id' => 'int64', 'status' => null, 'name' => null, - 'exportUrl' => null + 'export_url' => null ]; /** @@ -105,7 +105,7 @@ public static function swaggerFormats() 'id' => 'id', 'status' => 'status', 'name' => 'name', - 'exportUrl' => 'export_url' + 'export_url' => 'export_url' ]; /** @@ -117,7 +117,7 @@ public static function swaggerFormats() 'id' => 'setId', 'status' => 'setStatus', 'name' => 'setName', - 'exportUrl' => 'setExportUrl' + 'export_url' => 'setExportUrl' ]; /** @@ -129,7 +129,7 @@ public static function swaggerFormats() 'id' => 'getId', 'status' => 'getStatus', 'name' => 'getName', - 'exportUrl' => 'getExportUrl' + 'export_url' => 'getExportUrl' ]; /** @@ -212,7 +212,7 @@ public function __construct(array $data = null) $this->container['id'] = isset($data['id']) ? $data['id'] : null; $this->container['status'] = isset($data['status']) ? $data['status'] : null; $this->container['name'] = isset($data['name']) ? $data['name'] : null; - $this->container['exportUrl'] = isset($data['exportUrl']) ? $data['exportUrl'] : null; + $this->container['export_url'] = isset($data['export_url']) ? $data['export_url'] : null; } /** @@ -338,25 +338,25 @@ public function setName($name) } /** - * Gets exportUrl + * Gets export_url * * @return string */ public function getExportUrl() { - return $this->container['exportUrl']; + return $this->container['export_url']; } /** - * Sets exportUrl + * Sets export_url * - * @param string $exportUrl URL on which send export the of contacts once the process is completed + * @param string $export_url URL on which send export the of contacts once the process is completed * * @return $this */ - public function setExportUrl($exportUrl) + public function setExportUrl($export_url) { - $this->container['exportUrl'] = $exportUrl; + $this->container['export_url'] = $export_url; return $this; } @@ -367,6 +367,7 @@ public function setExportUrl($exportUrl) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -379,6 +380,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -392,6 +394,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -408,6 +411,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetProcesses.php b/lib/Model/GetProcesses.php index 666a287c..378b75c8 100644 --- a/lib/Model/GetProcesses.php +++ b/lib/Model/GetProcesses.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -195,6 +195,9 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['count'] === null) { + $invalidProperties[] = "'count' can't be null"; + } return $invalidProperties; } @@ -264,6 +267,7 @@ public function setCount($count) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -276,6 +280,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -289,6 +294,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -305,6 +311,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetReports.php b/lib/Model/GetReports.php index 9556ad12..efb11d3f 100644 --- a/lib/Model/GetReports.php +++ b/lib/Model/GetReports.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -234,6 +234,7 @@ public function setReports($reports) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -246,6 +247,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -259,6 +261,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -275,6 +278,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetReportsReports.php b/lib/Model/GetReportsReports.php index 31f10a6f..9f17e2bc 100644 --- a/lib/Model/GetReportsReports.php +++ b/lib/Model/GetReportsReports.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -60,13 +60,13 @@ class GetReportsReports implements ModelInterface, ArrayAccess 'date' => '\DateTime', 'requests' => 'int', 'delivered' => 'int', - 'hardBounces' => 'int', - 'softBounces' => 'int', + 'hard_bounces' => 'int', + 'soft_bounces' => 'int', 'clicks' => 'int', - 'uniqueClicks' => 'int', + 'unique_clicks' => 'int', 'opens' => 'int', - 'uniqueOpens' => 'int', - 'spamReports' => 'int', + 'unique_opens' => 'int', + 'spam_reports' => 'int', 'blocked' => 'int', 'invalid' => 'int', 'unsubscribed' => 'int' @@ -81,13 +81,13 @@ class GetReportsReports implements ModelInterface, ArrayAccess 'date' => 'date', 'requests' => 'int64', 'delivered' => 'int64', - 'hardBounces' => 'int64', - 'softBounces' => 'int64', + 'hard_bounces' => 'int64', + 'soft_bounces' => 'int64', 'clicks' => 'int64', - 'uniqueClicks' => 'int64', + 'unique_clicks' => 'int64', 'opens' => 'int64', - 'uniqueOpens' => 'int64', - 'spamReports' => 'int64', + 'unique_opens' => 'int64', + 'spam_reports' => 'int64', 'blocked' => 'int64', 'invalid' => 'int64', 'unsubscribed' => 'int64' @@ -123,13 +123,13 @@ public static function swaggerFormats() 'date' => 'date', 'requests' => 'requests', 'delivered' => 'delivered', - 'hardBounces' => 'hardBounces', - 'softBounces' => 'softBounces', + 'hard_bounces' => 'hardBounces', + 'soft_bounces' => 'softBounces', 'clicks' => 'clicks', - 'uniqueClicks' => 'uniqueClicks', + 'unique_clicks' => 'uniqueClicks', 'opens' => 'opens', - 'uniqueOpens' => 'uniqueOpens', - 'spamReports' => 'spamReports', + 'unique_opens' => 'uniqueOpens', + 'spam_reports' => 'spamReports', 'blocked' => 'blocked', 'invalid' => 'invalid', 'unsubscribed' => 'unsubscribed' @@ -144,13 +144,13 @@ public static function swaggerFormats() 'date' => 'setDate', 'requests' => 'setRequests', 'delivered' => 'setDelivered', - 'hardBounces' => 'setHardBounces', - 'softBounces' => 'setSoftBounces', + 'hard_bounces' => 'setHardBounces', + 'soft_bounces' => 'setSoftBounces', 'clicks' => 'setClicks', - 'uniqueClicks' => 'setUniqueClicks', + 'unique_clicks' => 'setUniqueClicks', 'opens' => 'setOpens', - 'uniqueOpens' => 'setUniqueOpens', - 'spamReports' => 'setSpamReports', + 'unique_opens' => 'setUniqueOpens', + 'spam_reports' => 'setSpamReports', 'blocked' => 'setBlocked', 'invalid' => 'setInvalid', 'unsubscribed' => 'setUnsubscribed' @@ -165,13 +165,13 @@ public static function swaggerFormats() 'date' => 'getDate', 'requests' => 'getRequests', 'delivered' => 'getDelivered', - 'hardBounces' => 'getHardBounces', - 'softBounces' => 'getSoftBounces', + 'hard_bounces' => 'getHardBounces', + 'soft_bounces' => 'getSoftBounces', 'clicks' => 'getClicks', - 'uniqueClicks' => 'getUniqueClicks', + 'unique_clicks' => 'getUniqueClicks', 'opens' => 'getOpens', - 'uniqueOpens' => 'getUniqueOpens', - 'spamReports' => 'getSpamReports', + 'unique_opens' => 'getUniqueOpens', + 'spam_reports' => 'getSpamReports', 'blocked' => 'getBlocked', 'invalid' => 'getInvalid', 'unsubscribed' => 'getUnsubscribed' @@ -240,13 +240,13 @@ public function __construct(array $data = null) $this->container['date'] = isset($data['date']) ? $data['date'] : null; $this->container['requests'] = isset($data['requests']) ? $data['requests'] : null; $this->container['delivered'] = isset($data['delivered']) ? $data['delivered'] : null; - $this->container['hardBounces'] = isset($data['hardBounces']) ? $data['hardBounces'] : null; - $this->container['softBounces'] = isset($data['softBounces']) ? $data['softBounces'] : null; + $this->container['hard_bounces'] = isset($data['hard_bounces']) ? $data['hard_bounces'] : null; + $this->container['soft_bounces'] = isset($data['soft_bounces']) ? $data['soft_bounces'] : null; $this->container['clicks'] = isset($data['clicks']) ? $data['clicks'] : null; - $this->container['uniqueClicks'] = isset($data['uniqueClicks']) ? $data['uniqueClicks'] : null; + $this->container['unique_clicks'] = isset($data['unique_clicks']) ? $data['unique_clicks'] : null; $this->container['opens'] = isset($data['opens']) ? $data['opens'] : null; - $this->container['uniqueOpens'] = isset($data['uniqueOpens']) ? $data['uniqueOpens'] : null; - $this->container['spamReports'] = isset($data['spamReports']) ? $data['spamReports'] : null; + $this->container['unique_opens'] = isset($data['unique_opens']) ? $data['unique_opens'] : null; + $this->container['spam_reports'] = isset($data['spam_reports']) ? $data['spam_reports'] : null; $this->container['blocked'] = isset($data['blocked']) ? $data['blocked'] : null; $this->container['invalid'] = isset($data['invalid']) ? $data['invalid'] : null; $this->container['unsubscribed'] = isset($data['unsubscribed']) ? $data['unsubscribed'] : null; @@ -270,26 +270,26 @@ public function listInvalidProperties() if ($this->container['delivered'] === null) { $invalidProperties[] = "'delivered' can't be null"; } - if ($this->container['hardBounces'] === null) { - $invalidProperties[] = "'hardBounces' can't be null"; + if ($this->container['hard_bounces'] === null) { + $invalidProperties[] = "'hard_bounces' can't be null"; } - if ($this->container['softBounces'] === null) { - $invalidProperties[] = "'softBounces' can't be null"; + if ($this->container['soft_bounces'] === null) { + $invalidProperties[] = "'soft_bounces' can't be null"; } if ($this->container['clicks'] === null) { $invalidProperties[] = "'clicks' can't be null"; } - if ($this->container['uniqueClicks'] === null) { - $invalidProperties[] = "'uniqueClicks' can't be null"; + if ($this->container['unique_clicks'] === null) { + $invalidProperties[] = "'unique_clicks' can't be null"; } if ($this->container['opens'] === null) { $invalidProperties[] = "'opens' can't be null"; } - if ($this->container['uniqueOpens'] === null) { - $invalidProperties[] = "'uniqueOpens' can't be null"; + if ($this->container['unique_opens'] === null) { + $invalidProperties[] = "'unique_opens' can't be null"; } - if ($this->container['spamReports'] === null) { - $invalidProperties[] = "'spamReports' can't be null"; + if ($this->container['spam_reports'] === null) { + $invalidProperties[] = "'spam_reports' can't be null"; } if ($this->container['blocked'] === null) { $invalidProperties[] = "'blocked' can't be null"; @@ -388,49 +388,49 @@ public function setDelivered($delivered) } /** - * Gets hardBounces + * Gets hard_bounces * * @return int */ public function getHardBounces() { - return $this->container['hardBounces']; + return $this->container['hard_bounces']; } /** - * Sets hardBounces + * Sets hard_bounces * - * @param int $hardBounces Number of hardbounces for the date + * @param int $hard_bounces Number of hardbounces for the date * * @return $this */ - public function setHardBounces($hardBounces) + public function setHardBounces($hard_bounces) { - $this->container['hardBounces'] = $hardBounces; + $this->container['hard_bounces'] = $hard_bounces; return $this; } /** - * Gets softBounces + * Gets soft_bounces * * @return int */ public function getSoftBounces() { - return $this->container['softBounces']; + return $this->container['soft_bounces']; } /** - * Sets softBounces + * Sets soft_bounces * - * @param int $softBounces Number of softbounces for the date + * @param int $soft_bounces Number of softbounces for the date * * @return $this */ - public function setSoftBounces($softBounces) + public function setSoftBounces($soft_bounces) { - $this->container['softBounces'] = $softBounces; + $this->container['soft_bounces'] = $soft_bounces; return $this; } @@ -460,25 +460,25 @@ public function setClicks($clicks) } /** - * Gets uniqueClicks + * Gets unique_clicks * * @return int */ public function getUniqueClicks() { - return $this->container['uniqueClicks']; + return $this->container['unique_clicks']; } /** - * Sets uniqueClicks + * Sets unique_clicks * - * @param int $uniqueClicks Number of unique clicks for the date + * @param int $unique_clicks Number of unique clicks for the date * * @return $this */ - public function setUniqueClicks($uniqueClicks) + public function setUniqueClicks($unique_clicks) { - $this->container['uniqueClicks'] = $uniqueClicks; + $this->container['unique_clicks'] = $unique_clicks; return $this; } @@ -508,49 +508,49 @@ public function setOpens($opens) } /** - * Gets uniqueOpens + * Gets unique_opens * * @return int */ public function getUniqueOpens() { - return $this->container['uniqueOpens']; + return $this->container['unique_opens']; } /** - * Sets uniqueOpens + * Sets unique_opens * - * @param int $uniqueOpens Number of unique openings for the date + * @param int $unique_opens Number of unique openings for the date * * @return $this */ - public function setUniqueOpens($uniqueOpens) + public function setUniqueOpens($unique_opens) { - $this->container['uniqueOpens'] = $uniqueOpens; + $this->container['unique_opens'] = $unique_opens; return $this; } /** - * Gets spamReports + * Gets spam_reports * * @return int */ public function getSpamReports() { - return $this->container['spamReports']; + return $this->container['spam_reports']; } /** - * Sets spamReports + * Sets spam_reports * - * @param int $spamReports Number of complaints (spam reports) for the date + * @param int $spam_reports Number of complaints (spam reports) for the date * * @return $this */ - public function setSpamReports($spamReports) + public function setSpamReports($spam_reports) { - $this->container['spamReports'] = $spamReports; + $this->container['spam_reports'] = $spam_reports; return $this; } @@ -633,6 +633,7 @@ public function setUnsubscribed($unsubscribed) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -645,6 +646,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -658,6 +660,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -674,6 +677,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetScheduledEmailByBatchId.php b/lib/Model/GetScheduledEmailByBatchId.php deleted file mode 100644 index d67c20e1..00000000 --- a/lib/Model/GetScheduledEmailByBatchId.php +++ /dev/null @@ -1,331 +0,0 @@ - 'int', - 'batches' => '\SendinBlue\Client\Model\GetScheduledEmailByBatchIdBatches[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'count' => null, - 'batches' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'count' => 'count', - 'batches' => 'batches' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'count' => 'setCount', - 'batches' => 'setBatches' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'count' => 'getCount', - 'batches' => 'getBatches' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['count'] = isset($data['count']) ? $data['count'] : null; - $this->container['batches'] = isset($data['batches']) ? $data['batches'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets count - * - * @return int - */ - public function getCount() - { - return $this->container['count']; - } - - /** - * Sets count - * - * @param int $count Total number of batches - * - * @return $this - */ - public function setCount($count) - { - $this->container['count'] = $count; - - return $this; - } - - /** - * Gets batches - * - * @return \SendinBlue\Client\Model\GetScheduledEmailByBatchIdBatches[] - */ - public function getBatches() - { - return $this->container['batches']; - } - - /** - * Sets batches - * - * @param \SendinBlue\Client\Model\GetScheduledEmailByBatchIdBatches[] $batches batches - * - * @return $this - */ - public function setBatches($batches) - { - $this->container['batches'] = $batches; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/GetScheduledEmailByBatchIdBatches.php b/lib/Model/GetScheduledEmailByBatchIdBatches.php deleted file mode 100644 index 2e068e38..00000000 --- a/lib/Model/GetScheduledEmailByBatchIdBatches.php +++ /dev/null @@ -1,406 +0,0 @@ - '\DateTime', - 'createdAt' => '\DateTime', - 'status' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'scheduledAt' => 'date-time', - 'createdAt' => 'date-time', - 'status' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'scheduledAt' => 'scheduledAt', - 'createdAt' => 'createdAt', - 'status' => 'status' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'scheduledAt' => 'setScheduledAt', - 'createdAt' => 'setCreatedAt', - 'status' => 'setStatus' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'scheduledAt' => 'getScheduledAt', - 'createdAt' => 'getCreatedAt', - 'status' => 'getStatus' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - const STATUS_IN_PROGRESS = 'inProgress'; - const STATUS_QUEUED = 'queued'; - const STATUS_PROCESSED = 'processed'; - const STATUS_ERROR = 'error'; - - - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getStatusAllowableValues() - { - return [ - self::STATUS_IN_PROGRESS, - self::STATUS_QUEUED, - self::STATUS_PROCESSED, - self::STATUS_ERROR, - ]; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['scheduledAt'] = isset($data['scheduledAt']) ? $data['scheduledAt'] : null; - $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; - $this->container['status'] = isset($data['status']) ? $data['status'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['scheduledAt'] === null) { - $invalidProperties[] = "'scheduledAt' can't be null"; - } - if ($this->container['createdAt'] === null) { - $invalidProperties[] = "'createdAt' can't be null"; - } - if ($this->container['status'] === null) { - $invalidProperties[] = "'status' can't be null"; - } - $allowedValues = $this->getStatusAllowableValues(); - if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value for 'status', must be one of '%s'", - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets scheduledAt - * - * @return \DateTime - */ - public function getScheduledAt() - { - return $this->container['scheduledAt']; - } - - /** - * Sets scheduledAt - * - * @param \DateTime $scheduledAt Datetime for which the batch was scheduled - * - * @return $this - */ - public function setScheduledAt($scheduledAt) - { - $this->container['scheduledAt'] = $scheduledAt; - - return $this; - } - - /** - * Gets createdAt - * - * @return \DateTime - */ - public function getCreatedAt() - { - return $this->container['createdAt']; - } - - /** - * Sets createdAt - * - * @param \DateTime $createdAt Datetime on which the batch was scheduled - * - * @return $this - */ - public function setCreatedAt($createdAt) - { - $this->container['createdAt'] = $createdAt; - - return $this; - } - - /** - * Gets status - * - * @return string - */ - public function getStatus() - { - return $this->container['status']; - } - - /** - * Sets status - * - * @param string $status Current status of the scheduled batch - * - * @return $this - */ - public function setStatus($status) - { - $allowedValues = $this->getStatusAllowableValues(); - if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value for 'status', must be one of '%s'", - implode("', '", $allowedValues) - ) - ); - } - $this->container['status'] = $status; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/GetScheduledEmailByMessageId.php b/lib/Model/GetScheduledEmailByMessageId.php deleted file mode 100644 index a797fc28..00000000 --- a/lib/Model/GetScheduledEmailByMessageId.php +++ /dev/null @@ -1,406 +0,0 @@ - '\DateTime', - 'createdAt' => '\DateTime', - 'status' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'scheduledAt' => 'date-time', - 'createdAt' => 'date-time', - 'status' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'scheduledAt' => 'scheduledAt', - 'createdAt' => 'createdAt', - 'status' => 'status' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'scheduledAt' => 'setScheduledAt', - 'createdAt' => 'setCreatedAt', - 'status' => 'setStatus' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'scheduledAt' => 'getScheduledAt', - 'createdAt' => 'getCreatedAt', - 'status' => 'getStatus' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - const STATUS_IN_PROGRESS = 'inProgress'; - const STATUS_QUEUED = 'queued'; - const STATUS_PROCESSED = 'processed'; - const STATUS_ERROR = 'error'; - - - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getStatusAllowableValues() - { - return [ - self::STATUS_IN_PROGRESS, - self::STATUS_QUEUED, - self::STATUS_PROCESSED, - self::STATUS_ERROR, - ]; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['scheduledAt'] = isset($data['scheduledAt']) ? $data['scheduledAt'] : null; - $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; - $this->container['status'] = isset($data['status']) ? $data['status'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['scheduledAt'] === null) { - $invalidProperties[] = "'scheduledAt' can't be null"; - } - if ($this->container['createdAt'] === null) { - $invalidProperties[] = "'createdAt' can't be null"; - } - if ($this->container['status'] === null) { - $invalidProperties[] = "'status' can't be null"; - } - $allowedValues = $this->getStatusAllowableValues(); - if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value for 'status', must be one of '%s'", - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets scheduledAt - * - * @return \DateTime - */ - public function getScheduledAt() - { - return $this->container['scheduledAt']; - } - - /** - * Sets scheduledAt - * - * @param \DateTime $scheduledAt Datetime for which the email was scheduled - * - * @return $this - */ - public function setScheduledAt($scheduledAt) - { - $this->container['scheduledAt'] = $scheduledAt; - - return $this; - } - - /** - * Gets createdAt - * - * @return \DateTime - */ - public function getCreatedAt() - { - return $this->container['createdAt']; - } - - /** - * Sets createdAt - * - * @param \DateTime $createdAt Datetime on which the email was scheduled - * - * @return $this - */ - public function setCreatedAt($createdAt) - { - $this->container['createdAt'] = $createdAt; - - return $this; - } - - /** - * Gets status - * - * @return string - */ - public function getStatus() - { - return $this->container['status']; - } - - /** - * Sets status - * - * @param string $status Current status of the scheduled email - * - * @return $this - */ - public function setStatus($status) - { - $allowedValues = $this->getStatusAllowableValues(); - if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value for 'status', must be one of '%s'", - implode("', '", $allowedValues) - ) - ); - } - $this->container['status'] = $status; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/GetSendersList.php b/lib/Model/GetSendersList.php index 4ce014a2..f5fc8b2f 100644 --- a/lib/Model/GetSendersList.php +++ b/lib/Model/GetSendersList.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -234,6 +234,7 @@ public function setSenders($senders) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -246,6 +247,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -259,6 +261,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -275,6 +278,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetSendersListIps.php b/lib/Model/GetSendersListIps.php index c4053304..cf497d34 100644 --- a/lib/Model/GetSendersListIps.php +++ b/lib/Model/GetSendersListIps.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -303,6 +303,7 @@ public function setWeight($weight) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -315,6 +316,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -328,6 +330,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -344,6 +347,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetSendersListSenders.php b/lib/Model/GetSendersListSenders.php index 097ad166..bf14dcad 100644 --- a/lib/Model/GetSendersListSenders.php +++ b/lib/Model/GetSendersListSenders.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -366,6 +366,7 @@ public function setIps($ips) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -378,6 +379,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -391,6 +393,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -407,6 +410,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetSharedTemplateUrl.php b/lib/Model/GetSharedTemplateUrl.php index 05c023e0..adbbc077 100644 --- a/lib/Model/GetSharedTemplateUrl.php +++ b/lib/Model/GetSharedTemplateUrl.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -57,7 +57,7 @@ class GetSharedTemplateUrl implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'sharedUrl' => 'string' + 'shared_url' => 'string' ]; /** @@ -66,7 +66,7 @@ class GetSharedTemplateUrl implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'sharedUrl' => 'url' + 'shared_url' => 'url' ]; /** @@ -96,7 +96,7 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'sharedUrl' => 'sharedUrl' + 'shared_url' => 'sharedUrl' ]; /** @@ -105,7 +105,7 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'sharedUrl' => 'setSharedUrl' + 'shared_url' => 'setSharedUrl' ]; /** @@ -114,7 +114,7 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'sharedUrl' => 'getSharedUrl' + 'shared_url' => 'getSharedUrl' ]; /** @@ -177,7 +177,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['sharedUrl'] = isset($data['sharedUrl']) ? $data['sharedUrl'] : null; + $this->container['shared_url'] = isset($data['shared_url']) ? $data['shared_url'] : null; } /** @@ -189,8 +189,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['sharedUrl'] === null) { - $invalidProperties[] = "'sharedUrl' can't be null"; + if ($this->container['shared_url'] === null) { + $invalidProperties[] = "'shared_url' can't be null"; } return $invalidProperties; } @@ -208,25 +208,25 @@ public function valid() /** - * Gets sharedUrl + * Gets shared_url * * @return string */ public function getSharedUrl() { - return $this->container['sharedUrl']; + return $this->container['shared_url']; } /** - * Sets sharedUrl + * Sets shared_url * - * @param string $sharedUrl A unique URL for the email campaign or transactional template. This URL can be shared with other Sendinblue users. + * @param string $shared_url A unique URL for the email campaign or transactional template. This URL can be shared with other Sendinblue users. * * @return $this */ - public function setSharedUrl($sharedUrl) + public function setSharedUrl($shared_url) { - $this->container['sharedUrl'] = $sharedUrl; + $this->container['shared_url'] = $shared_url; return $this; } @@ -237,6 +237,7 @@ public function setSharedUrl($sharedUrl) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -249,6 +250,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -262,6 +264,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -278,6 +281,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetSmsCampaign.php b/lib/Model/GetSmsCampaign.php index fd68d201..53bad1c5 100644 --- a/lib/Model/GetSmsCampaign.php +++ b/lib/Model/GetSmsCampaign.php @@ -9,6 +9,7 @@ * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ + /** * SendinBlue API * @@ -17,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -27,8 +28,6 @@ */ namespace SendinBlue\Client\Model; - -use \ArrayAccess; use \SendinBlue\Client\ObjectSerializer; /** @@ -39,7 +38,7 @@ * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class GetSmsCampaign implements ModelInterface, ArrayAccess +class GetSmsCampaign extends GetSmsCampaignOverview { const DISCRIMINATOR = null; @@ -49,40 +48,27 @@ class GetSmsCampaign implements ModelInterface, ArrayAccess * @var string */ protected static $swaggerModelName = 'getSmsCampaign'; + /** * Array of property to type mappings. Used for (de)serialization * * @var string[] */ protected static $swaggerTypes = [ - 'id' => 'int', - 'name' => 'string', - 'status' => 'string', - 'content' => 'string', - 'scheduledAt' => 'string', - 'sender' => 'string', - 'createdAt' => 'string', - 'modifiedAt' => 'string', - 'recipients' => 'object', - 'statistics' => 'object' + 'recipients' => '\SendinBlue\Client\Model\GetSmsCampaignRecipients', + 'statistics' => '\SendinBlue\Client\Model\GetSmsCampaignRecipients' ]; /** - @@ -75,14 +65,6 @@ class GetSmsCampaign implements ModelInterface, ArrayAccess + * Array of property to format mappings. Used for (de)serialization + * * @var string[] */ protected static $swaggerFormats = [ - 'id' => 'int64', - 'name' => null, - 'status' => null, - 'content' => null, - 'scheduledAt' => null, - 'sender' => null, - 'createdAt' => null, - 'modifiedAt' => null, 'recipients' => null, 'statistics' => null ]; + /** * Array of property to type mappings. Used for (de)serialization * @@ -90,7 +76,7 @@ class GetSmsCampaign implements ModelInterface, ArrayAccess */ public static function swaggerTypes() { - return self::$swaggerTypes; + return self::$swaggerTypes + parent::swaggerTypes(); } /** @@ -100,7 +86,7 @@ public static function swaggerTypes() */ public static function swaggerFormats() { - return self::$swaggerFormats; + return self::$swaggerFormats + parent::swaggerFormats(); } /** @@ -110,51 +96,30 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', - 'name' => 'name', - 'status' => 'status', - 'content' => 'content', - 'scheduledAt' => 'scheduledAt', - 'sender' => 'sender', - 'createdAt' => 'createdAt', - 'modifiedAt' => 'modifiedAt', 'recipients' => 'recipients', 'statistics' => 'statistics' ]; + /** * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static $setters = [ - 'id' => 'setId', - 'name' => 'setName', - 'status' => 'setStatus', - 'content' => 'setContent', - 'scheduledAt' => 'setScheduledAt', - 'sender' => 'setSender', - 'createdAt' => 'setCreatedAt', - 'modifiedAt' => 'setModifiedAt', 'recipients' => 'setRecipients', 'statistics' => 'setStatistics' ]; + /** * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static $getters = [ - 'id' => 'getId', - 'name' => 'getName', - 'status' => 'getStatus', - 'content' => 'getContent', - 'scheduledAt' => 'getScheduledAt', - 'sender' => 'getSender', - 'createdAt' => 'getCreatedAt', - 'modifiedAt' => 'getModifiedAt', 'recipients' => 'getRecipients', 'statistics' => 'getStatistics' ]; + /** * Array of attributes where the key is the local name, * and the value is the original name @@ -163,7 +128,7 @@ public static function swaggerFormats() */ public static function attributeMap() { - return self::$attributeMap; + return parent::attributeMap() + self::$attributeMap; } /** @@ -173,7 +138,7 @@ public static function attributeMap() */ public static function setters() { - return self::$setters; + return parent::setters() + self::$setters; } /** @@ -183,7 +148,7 @@ public static function setters() */ public static function getters() { - return self::$getters; + return parent::getters() + self::$getters; } /** @@ -196,40 +161,11 @@ public function getModelName() return self::$swaggerModelName; } - const STATUS_DRAFT = 'draft'; - const STATUS_SENT = 'sent'; - const STATUS_ARCHIVE = 'archive'; - const STATUS_QUEUED = 'queued'; - const STATUS_SUSPENDED = 'suspended'; - const STATUS_IN_PROCESS = 'inProcess'; + + - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getStatusAllowableValues() - { - return [ - self::STATUS_DRAFT, - self::STATUS_SENT, - self::STATUS_ARCHIVE, - self::STATUS_QUEUED, - self::STATUS_SUSPENDED, - self::STATUS_IN_PROCESS, - ]; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - /** * Constructor * @@ -238,17 +174,12 @@ public function getStatusAllowableValues() */ public function __construct(array $data = null) { - $this->container['id'] = isset($data['id']) ? $data['id'] : null; - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - $this->container['status'] = isset($data['status']) ? $data['status'] : null; - $this->container['content'] = isset($data['content']) ? $data['content'] : null; - $this->container['scheduledAt'] = isset($data['scheduledAt']) ? $data['scheduledAt'] : null; - $this->container['sender'] = isset($data['sender']) ? $data['sender'] : null; - $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; - $this->container['modifiedAt'] = isset($data['modifiedAt']) ? $data['modifiedAt'] : null; + parent::__construct($data); + $this->container['recipients'] = isset($data['recipients']) ? $data['recipients'] : null; $this->container['statistics'] = isset($data['statistics']) ? $data['statistics'] : null; } + /** * Show all the invalid properties with reasons. * @@ -256,37 +187,8 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ($this->container['status'] === null) { - $invalidProperties[] = "'status' can't be null"; - } - $allowedValues = $this->getStatusAllowableValues(); - if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value for 'status', must be one of '%s'", - implode("', '", $allowedValues) - ); - } + $invalidProperties = parent::listInvalidProperties(); - if ($this->container['content'] === null) { - $invalidProperties[] = "'content' can't be null"; - } - if ($this->container['sender'] === null) { - $invalidProperties[] = "'sender' can't be null"; - } - if ($this->container['createdAt'] === null) { - $invalidProperties[] = "'createdAt' can't be null"; - } - if ($this->container['modifiedAt'] === null) { - $invalidProperties[] = "'modifiedAt' can't be null"; - } if ($this->container['recipients'] === null) { $invalidProperties[] = "'recipients' can't be null"; } @@ -295,6 +197,7 @@ public function listInvalidProperties() } return $invalidProperties; } + /** * Validate all the properties in the model * return true if all passed @@ -307,247 +210,51 @@ public function valid() } - /** - * Gets id - * - * @return int - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param int $id ID of the SMS Campaign - * - * @return $this - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name Name of the SMS Campaign - * - * @return $this - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets status - * - * @return string - */ - public function getStatus() - { - return $this->container['status']; - } - - /** - * Sets status - * - * @param string $status Status of the SMS Campaign - * - * @return $this - */ - public function setStatus($status) - { - $allowedValues = $this->getStatusAllowableValues(); - if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value for 'status', must be one of '%s'", - implode("', '", $allowedValues) - ) - ); - } - $this->container['status'] = $status; - - return $this; - } - - /** - * Gets content - * - * @return string - */ - public function getContent() - { - return $this->container['content']; - } - - /** - * Sets content - * - * @param string $content Content of the SMS Campaign - * - * @return $this - */ - public function setContent($content) - { - $this->container['content'] = $content; - - return $this; - } - - /** - * Gets scheduledAt - * - * @return string - */ - public function getScheduledAt() - { - return $this->container['scheduledAt']; - } - - /** - * Sets scheduledAt - * - * @param string $scheduledAt UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format - * - * @return $this - */ - public function setScheduledAt($scheduledAt) - { - $this->container['scheduledAt'] = $scheduledAt; - - return $this; - } - - /** - * Gets sender - * - * @return string - */ - public function getSender() - { - return $this->container['sender']; - } - - /** - * Sets sender - * - * @param string $sender Sender of the SMS Campaign - * - * @return $this - */ - public function setSender($sender) - { - $this->container['sender'] = $sender; - - return $this; - } - - /** - * Gets createdAt - * - * @return string - */ - public function getCreatedAt() - { - return $this->container['createdAt']; - } - - /** - * Sets createdAt - * - * @param string $createdAt Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) - * - * @return $this - */ - public function setCreatedAt($createdAt) - { - $this->container['createdAt'] = $createdAt; - - return $this; - } - - /** - * Gets modifiedAt - * - * @return string - */ - public function getModifiedAt() - { - return $this->container['modifiedAt']; - } - - /** - * Sets modifiedAt - * - * @param string $modifiedAt UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) - * - * @return $this - */ - public function setModifiedAt($modifiedAt) - { - $this->container['modifiedAt'] = $modifiedAt; - - return $this; - } - /** * Gets recipients * - * @return object + * @return \SendinBlue\Client\Model\GetSmsCampaignRecipients */ public function getRecipients() { return $this->container['recipients']; } + /** * Sets recipients * - * @param object $recipients recipients + * @param \SendinBlue\Client\Model\GetSmsCampaignRecipients $recipients recipients * * @return $this */ public function setRecipients($recipients) { $this->container['recipients'] = $recipients; + return $this; } + /** * Gets statistics * - * @return object + * @return \SendinBlue\Client\Model\GetSmsCampaignRecipients */ public function getStatistics() { return $this->container['statistics']; } + /** * Sets statistics * - * @param object $statistics statistics + * @param \SendinBlue\Client\Model\GetSmsCampaignRecipients $statistics statistics * * @return $this */ public function setStatistics($statistics) { $this->container['statistics'] = $statistics; + return $this; } /** @@ -557,10 +264,12 @@ public function setStatistics($statistics) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); } + /** * Gets offset. * @@ -568,10 +277,12 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; } + /** * Sets value based on offset. * @@ -580,6 +291,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -588,6 +300,7 @@ public function offsetSet($offset, $value) $this->container[$offset] = $value; } } + /** * Unsets offset. * @@ -595,10 +308,12 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } + /** * Gets the string presentation of the object * @@ -612,6 +327,9 @@ public function __toString() JSON_PRETTY_PRINT ); } + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } -} \ No newline at end of file +} + + diff --git a/lib/Model/GetSmsCampaignOverview.php b/lib/Model/GetSmsCampaignOverview.php index 62663a19..2095ddae 100644 --- a/lib/Model/GetSmsCampaignOverview.php +++ b/lib/Model/GetSmsCampaignOverview.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -61,10 +61,10 @@ class GetSmsCampaignOverview implements ModelInterface, ArrayAccess 'name' => 'string', 'status' => 'string', 'content' => 'string', - 'scheduledAt' => 'string', + 'scheduled_at' => '\DateTime', 'sender' => 'string', - 'createdAt' => 'string', - 'modifiedAt' => 'string' + 'created_at' => '\DateTime', + 'modified_at' => '\DateTime' ]; /** @@ -77,10 +77,10 @@ class GetSmsCampaignOverview implements ModelInterface, ArrayAccess 'name' => null, 'status' => null, 'content' => null, - 'scheduledAt' => null, + 'scheduled_at' => 'date-time', 'sender' => null, - 'createdAt' => null, - 'modifiedAt' => null + 'created_at' => 'date-time', + 'modified_at' => 'date-time' ]; /** @@ -114,10 +114,10 @@ public static function swaggerFormats() 'name' => 'name', 'status' => 'status', 'content' => 'content', - 'scheduledAt' => 'scheduledAt', + 'scheduled_at' => 'scheduledAt', 'sender' => 'sender', - 'createdAt' => 'createdAt', - 'modifiedAt' => 'modifiedAt' + 'created_at' => 'createdAt', + 'modified_at' => 'modifiedAt' ]; /** @@ -130,10 +130,10 @@ public static function swaggerFormats() 'name' => 'setName', 'status' => 'setStatus', 'content' => 'setContent', - 'scheduledAt' => 'setScheduledAt', + 'scheduled_at' => 'setScheduledAt', 'sender' => 'setSender', - 'createdAt' => 'setCreatedAt', - 'modifiedAt' => 'setModifiedAt' + 'created_at' => 'setCreatedAt', + 'modified_at' => 'setModifiedAt' ]; /** @@ -146,10 +146,10 @@ public static function swaggerFormats() 'name' => 'getName', 'status' => 'getStatus', 'content' => 'getContent', - 'scheduledAt' => 'getScheduledAt', + 'scheduled_at' => 'getScheduledAt', 'sender' => 'getSender', - 'createdAt' => 'getCreatedAt', - 'modifiedAt' => 'getModifiedAt' + 'created_at' => 'getCreatedAt', + 'modified_at' => 'getModifiedAt' ]; /** @@ -239,10 +239,10 @@ public function __construct(array $data = null) $this->container['name'] = isset($data['name']) ? $data['name'] : null; $this->container['status'] = isset($data['status']) ? $data['status'] : null; $this->container['content'] = isset($data['content']) ? $data['content'] : null; - $this->container['scheduledAt'] = isset($data['scheduledAt']) ? $data['scheduledAt'] : null; + $this->container['scheduled_at'] = isset($data['scheduled_at']) ? $data['scheduled_at'] : null; $this->container['sender'] = isset($data['sender']) ? $data['sender'] : null; - $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; - $this->container['modifiedAt'] = isset($data['modifiedAt']) ? $data['modifiedAt'] : null; + $this->container['created_at'] = isset($data['created_at']) ? $data['created_at'] : null; + $this->container['modified_at'] = isset($data['modified_at']) ? $data['modified_at'] : null; } /** @@ -274,14 +274,17 @@ public function listInvalidProperties() if ($this->container['content'] === null) { $invalidProperties[] = "'content' can't be null"; } + if ($this->container['scheduled_at'] === null) { + $invalidProperties[] = "'scheduled_at' can't be null"; + } if ($this->container['sender'] === null) { $invalidProperties[] = "'sender' can't be null"; } - if ($this->container['createdAt'] === null) { - $invalidProperties[] = "'createdAt' can't be null"; + if ($this->container['created_at'] === null) { + $invalidProperties[] = "'created_at' can't be null"; } - if ($this->container['modifiedAt'] === null) { - $invalidProperties[] = "'modifiedAt' can't be null"; + if ($this->container['modified_at'] === null) { + $invalidProperties[] = "'modified_at' can't be null"; } return $invalidProperties; } @@ -404,25 +407,25 @@ public function setContent($content) } /** - * Gets scheduledAt + * Gets scheduled_at * - * @return string + * @return \DateTime */ public function getScheduledAt() { - return $this->container['scheduledAt']; + return $this->container['scheduled_at']; } /** - * Sets scheduledAt + * Sets scheduled_at * - * @param string $scheduledAt UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format + * @param \DateTime $scheduled_at UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format * * @return $this */ - public function setScheduledAt($scheduledAt) + public function setScheduledAt($scheduled_at) { - $this->container['scheduledAt'] = $scheduledAt; + $this->container['scheduled_at'] = $scheduled_at; return $this; } @@ -452,49 +455,49 @@ public function setSender($sender) } /** - * Gets createdAt + * Gets created_at * - * @return string + * @return \DateTime */ public function getCreatedAt() { - return $this->container['createdAt']; + return $this->container['created_at']; } /** - * Sets createdAt + * Sets created_at * - * @param string $createdAt Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @param \DateTime $created_at Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) * * @return $this */ - public function setCreatedAt($createdAt) + public function setCreatedAt($created_at) { - $this->container['createdAt'] = $createdAt; + $this->container['created_at'] = $created_at; return $this; } /** - * Gets modifiedAt + * Gets modified_at * - * @return string + * @return \DateTime */ public function getModifiedAt() { - return $this->container['modifiedAt']; + return $this->container['modified_at']; } /** - * Sets modifiedAt + * Sets modified_at * - * @param string $modifiedAt UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @param \DateTime $modified_at UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) * * @return $this */ - public function setModifiedAt($modifiedAt) + public function setModifiedAt($modified_at) { - $this->container['modifiedAt'] = $modifiedAt; + $this->container['modified_at'] = $modified_at; return $this; } @@ -505,6 +508,7 @@ public function setModifiedAt($modifiedAt) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -517,6 +521,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -530,6 +535,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -546,6 +552,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetSmsCampaignRecipients.php b/lib/Model/GetSmsCampaignRecipients.php index 1096d1d5..003418df 100644 --- a/lib/Model/GetSmsCampaignRecipients.php +++ b/lib/Model/GetSmsCampaignRecipients.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -209,6 +209,7 @@ public function valid() * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -221,6 +222,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -234,6 +236,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -250,6 +253,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetSmsCampaignStats.php b/lib/Model/GetSmsCampaignStats.php index e375c9f0..e61f3d6f 100644 --- a/lib/Model/GetSmsCampaignStats.php +++ b/lib/Model/GetSmsCampaignStats.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -60,8 +60,8 @@ class GetSmsCampaignStats implements ModelInterface, ArrayAccess 'delivered' => 'int', 'sent' => 'int', 'processing' => 'int', - 'softBounces' => 'int', - 'hardBounces' => 'int', + 'soft_bounces' => 'int', + 'hard_bounces' => 'int', 'unsubscriptions' => 'int', 'answered' => 'int' ]; @@ -75,8 +75,8 @@ class GetSmsCampaignStats implements ModelInterface, ArrayAccess 'delivered' => 'int64', 'sent' => 'int64', 'processing' => 'int64', - 'softBounces' => 'int64', - 'hardBounces' => 'int64', + 'soft_bounces' => 'int64', + 'hard_bounces' => 'int64', 'unsubscriptions' => 'int64', 'answered' => 'int64' ]; @@ -111,8 +111,8 @@ public static function swaggerFormats() 'delivered' => 'delivered', 'sent' => 'sent', 'processing' => 'processing', - 'softBounces' => 'softBounces', - 'hardBounces' => 'hardBounces', + 'soft_bounces' => 'softBounces', + 'hard_bounces' => 'hardBounces', 'unsubscriptions' => 'unsubscriptions', 'answered' => 'answered' ]; @@ -126,8 +126,8 @@ public static function swaggerFormats() 'delivered' => 'setDelivered', 'sent' => 'setSent', 'processing' => 'setProcessing', - 'softBounces' => 'setSoftBounces', - 'hardBounces' => 'setHardBounces', + 'soft_bounces' => 'setSoftBounces', + 'hard_bounces' => 'setHardBounces', 'unsubscriptions' => 'setUnsubscriptions', 'answered' => 'setAnswered' ]; @@ -141,8 +141,8 @@ public static function swaggerFormats() 'delivered' => 'getDelivered', 'sent' => 'getSent', 'processing' => 'getProcessing', - 'softBounces' => 'getSoftBounces', - 'hardBounces' => 'getHardBounces', + 'soft_bounces' => 'getSoftBounces', + 'hard_bounces' => 'getHardBounces', 'unsubscriptions' => 'getUnsubscriptions', 'answered' => 'getAnswered' ]; @@ -210,8 +210,8 @@ public function __construct(array $data = null) $this->container['delivered'] = isset($data['delivered']) ? $data['delivered'] : null; $this->container['sent'] = isset($data['sent']) ? $data['sent'] : null; $this->container['processing'] = isset($data['processing']) ? $data['processing'] : null; - $this->container['softBounces'] = isset($data['softBounces']) ? $data['softBounces'] : null; - $this->container['hardBounces'] = isset($data['hardBounces']) ? $data['hardBounces'] : null; + $this->container['soft_bounces'] = isset($data['soft_bounces']) ? $data['soft_bounces'] : null; + $this->container['hard_bounces'] = isset($data['hard_bounces']) ? $data['hard_bounces'] : null; $this->container['unsubscriptions'] = isset($data['unsubscriptions']) ? $data['unsubscriptions'] : null; $this->container['answered'] = isset($data['answered']) ? $data['answered'] : null; } @@ -234,11 +234,11 @@ public function listInvalidProperties() if ($this->container['processing'] === null) { $invalidProperties[] = "'processing' can't be null"; } - if ($this->container['softBounces'] === null) { - $invalidProperties[] = "'softBounces' can't be null"; + if ($this->container['soft_bounces'] === null) { + $invalidProperties[] = "'soft_bounces' can't be null"; } - if ($this->container['hardBounces'] === null) { - $invalidProperties[] = "'hardBounces' can't be null"; + if ($this->container['hard_bounces'] === null) { + $invalidProperties[] = "'hard_bounces' can't be null"; } if ($this->container['unsubscriptions'] === null) { $invalidProperties[] = "'unsubscriptions' can't be null"; @@ -334,49 +334,49 @@ public function setProcessing($processing) } /** - * Gets softBounces + * Gets soft_bounces * * @return int */ public function getSoftBounces() { - return $this->container['softBounces']; + return $this->container['soft_bounces']; } /** - * Sets softBounces + * Sets soft_bounces * - * @param int $softBounces Number of softbounced SMS + * @param int $soft_bounces Number of softbounced SMS * * @return $this */ - public function setSoftBounces($softBounces) + public function setSoftBounces($soft_bounces) { - $this->container['softBounces'] = $softBounces; + $this->container['soft_bounces'] = $soft_bounces; return $this; } /** - * Gets hardBounces + * Gets hard_bounces * * @return int */ public function getHardBounces() { - return $this->container['hardBounces']; + return $this->container['hard_bounces']; } /** - * Sets hardBounces + * Sets hard_bounces * - * @param int $hardBounces Number of hardbounced SMS + * @param int $hard_bounces Number of hardbounced SMS * * @return $this */ - public function setHardBounces($hardBounces) + public function setHardBounces($hard_bounces) { - $this->container['hardBounces'] = $hardBounces; + $this->container['hard_bounces'] = $hard_bounces; return $this; } @@ -435,6 +435,7 @@ public function setAnswered($answered) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -447,6 +448,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -460,6 +462,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -476,6 +479,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetSmsCampaigns.php b/lib/Model/GetSmsCampaigns.php index 08bc3d34..74489738 100644 --- a/lib/Model/GetSmsCampaigns.php +++ b/lib/Model/GetSmsCampaigns.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -195,6 +195,9 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['count'] === null) { + $invalidProperties[] = "'count' can't be null"; + } return $invalidProperties; } @@ -264,6 +267,7 @@ public function setCount($count) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -276,6 +280,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -289,6 +294,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -305,6 +311,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetSmsEventReport.php b/lib/Model/GetSmsEventReport.php index 327377e4..c55ed10b 100644 --- a/lib/Model/GetSmsEventReport.php +++ b/lib/Model/GetSmsEventReport.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -234,6 +234,7 @@ public function setEvents($events) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -246,6 +247,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -259,6 +261,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -275,6 +278,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetSmsEventReportEvents.php b/lib/Model/GetSmsEventReportEvents.php index 6c3d3580..70b7d772 100644 --- a/lib/Model/GetSmsEventReportEvents.php +++ b/lib/Model/GetSmsEventReportEvents.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -57,9 +57,9 @@ class GetSmsEventReportEvents implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'phoneNumber' => 'string', - 'date' => 'string', - 'messageId' => 'string', + 'phone_number' => 'string', + 'date' => '\DateTime', + 'message_id' => 'string', 'event' => 'string', 'reason' => 'string', 'reply' => 'string', @@ -72,9 +72,9 @@ class GetSmsEventReportEvents implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'phoneNumber' => null, - 'date' => null, - 'messageId' => null, + 'phone_number' => null, + 'date' => 'date-time', + 'message_id' => null, 'event' => null, 'reason' => null, 'reply' => null, @@ -108,9 +108,9 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'phoneNumber' => 'phoneNumber', + 'phone_number' => 'phoneNumber', 'date' => 'date', - 'messageId' => 'messageId', + 'message_id' => 'messageId', 'event' => 'event', 'reason' => 'reason', 'reply' => 'reply', @@ -123,9 +123,9 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'phoneNumber' => 'setPhoneNumber', + 'phone_number' => 'setPhoneNumber', 'date' => 'setDate', - 'messageId' => 'setMessageId', + 'message_id' => 'setMessageId', 'event' => 'setEvent', 'reason' => 'setReason', 'reply' => 'setReply', @@ -138,9 +138,9 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'phoneNumber' => 'getPhoneNumber', + 'phone_number' => 'getPhoneNumber', 'date' => 'getDate', - 'messageId' => 'getMessageId', + 'message_id' => 'getMessageId', 'event' => 'getEvent', 'reason' => 'getReason', 'reply' => 'getReply', @@ -236,9 +236,9 @@ public function getEventAllowableValues() */ public function __construct(array $data = null) { - $this->container['phoneNumber'] = isset($data['phoneNumber']) ? $data['phoneNumber'] : null; + $this->container['phone_number'] = isset($data['phone_number']) ? $data['phone_number'] : null; $this->container['date'] = isset($data['date']) ? $data['date'] : null; - $this->container['messageId'] = isset($data['messageId']) ? $data['messageId'] : null; + $this->container['message_id'] = isset($data['message_id']) ? $data['message_id'] : null; $this->container['event'] = isset($data['event']) ? $data['event'] : null; $this->container['reason'] = isset($data['reason']) ? $data['reason'] : null; $this->container['reply'] = isset($data['reply']) ? $data['reply'] : null; @@ -254,6 +254,18 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['phone_number'] === null) { + $invalidProperties[] = "'phone_number' can't be null"; + } + if ($this->container['date'] === null) { + $invalidProperties[] = "'date' can't be null"; + } + if ($this->container['message_id'] === null) { + $invalidProperties[] = "'message_id' can't be null"; + } + if ($this->container['event'] === null) { + $invalidProperties[] = "'event' can't be null"; + } $allowedValues = $this->getEventAllowableValues(); if (!is_null($this->container['event']) && !in_array($this->container['event'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -278,25 +290,25 @@ public function valid() /** - * Gets phoneNumber + * Gets phone_number * * @return string */ public function getPhoneNumber() { - return $this->container['phoneNumber']; + return $this->container['phone_number']; } /** - * Sets phoneNumber + * Sets phone_number * - * @param string $phoneNumber Phone number which has generated the event + * @param string $phone_number Phone number which has generated the event * * @return $this */ - public function setPhoneNumber($phoneNumber) + public function setPhoneNumber($phone_number) { - $this->container['phoneNumber'] = $phoneNumber; + $this->container['phone_number'] = $phone_number; return $this; } @@ -304,7 +316,7 @@ public function setPhoneNumber($phoneNumber) /** * Gets date * - * @return string + * @return \DateTime */ public function getDate() { @@ -314,7 +326,7 @@ public function getDate() /** * Sets date * - * @param string $date UTC date-time on which the event has been generated + * @param \DateTime $date UTC date-time on which the event has been generated * * @return $this */ @@ -326,25 +338,25 @@ public function setDate($date) } /** - * Gets messageId + * Gets message_id * * @return string */ public function getMessageId() { - return $this->container['messageId']; + return $this->container['message_id']; } /** - * Sets messageId + * Sets message_id * - * @param string $messageId Message ID which generated the event + * @param string $message_id Message ID which generated the event * * @return $this */ - public function setMessageId($messageId) + public function setMessageId($message_id) { - $this->container['messageId'] = $messageId; + $this->container['message_id'] = $message_id; return $this; } @@ -369,7 +381,7 @@ public function getEvent() public function setEvent($event) { $allowedValues = $this->getEventAllowableValues(); - if (!is_null($event) && !in_array($event, $allowedValues, true)) { + if (!in_array($event, $allowedValues, true)) { throw new \InvalidArgumentException( sprintf( "Invalid value for 'event', must be one of '%s'", @@ -460,6 +472,7 @@ public function setTag($tag) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -472,6 +485,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -485,6 +499,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -501,6 +516,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetSmtpTemplateOverview.php b/lib/Model/GetSmtpTemplateOverview.php index 0c5c3c63..b5ff3d55 100644 --- a/lib/Model/GetSmtpTemplateOverview.php +++ b/lib/Model/GetSmtpTemplateOverview.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -60,16 +60,16 @@ class GetSmtpTemplateOverview implements ModelInterface, ArrayAccess 'id' => 'int', 'name' => 'string', 'subject' => 'string', - 'isActive' => 'bool', - 'testSent' => 'bool', + 'is_active' => 'bool', + 'test_sent' => 'bool', 'sender' => '\SendinBlue\Client\Model\GetSmtpTemplateOverviewSender', - 'replyTo' => 'string', - 'toField' => 'string', + 'reply_to' => 'string', + 'to_field' => 'string', 'tag' => 'string', - 'htmlContent' => 'string', - 'createdAt' => 'string', - 'modifiedAt' => 'string', - 'doiTemplate' => 'bool' + 'html_content' => 'string', + 'created_at' => '\DateTime', + 'modified_at' => '\DateTime', + 'doi_template' => 'bool' ]; /** @@ -81,16 +81,16 @@ class GetSmtpTemplateOverview implements ModelInterface, ArrayAccess 'id' => 'int64', 'name' => null, 'subject' => null, - 'isActive' => null, - 'testSent' => null, + 'is_active' => null, + 'test_sent' => null, 'sender' => null, - 'replyTo' => 'email', - 'toField' => null, + 'reply_to' => 'email', + 'to_field' => null, 'tag' => null, - 'htmlContent' => null, - 'createdAt' => null, - 'modifiedAt' => null, - 'doiTemplate' => null + 'html_content' => null, + 'created_at' => 'date-time', + 'modified_at' => 'date-time', + 'doi_template' => null ]; /** @@ -123,16 +123,16 @@ public static function swaggerFormats() 'id' => 'id', 'name' => 'name', 'subject' => 'subject', - 'isActive' => 'isActive', - 'testSent' => 'testSent', + 'is_active' => 'isActive', + 'test_sent' => 'testSent', 'sender' => 'sender', - 'replyTo' => 'replyTo', - 'toField' => 'toField', + 'reply_to' => 'replyTo', + 'to_field' => 'toField', 'tag' => 'tag', - 'htmlContent' => 'htmlContent', - 'createdAt' => 'createdAt', - 'modifiedAt' => 'modifiedAt', - 'doiTemplate' => 'doiTemplate' + 'html_content' => 'htmlContent', + 'created_at' => 'createdAt', + 'modified_at' => 'modifiedAt', + 'doi_template' => 'doiTemplate' ]; /** @@ -144,16 +144,16 @@ public static function swaggerFormats() 'id' => 'setId', 'name' => 'setName', 'subject' => 'setSubject', - 'isActive' => 'setIsActive', - 'testSent' => 'setTestSent', + 'is_active' => 'setIsActive', + 'test_sent' => 'setTestSent', 'sender' => 'setSender', - 'replyTo' => 'setReplyTo', - 'toField' => 'setToField', + 'reply_to' => 'setReplyTo', + 'to_field' => 'setToField', 'tag' => 'setTag', - 'htmlContent' => 'setHtmlContent', - 'createdAt' => 'setCreatedAt', - 'modifiedAt' => 'setModifiedAt', - 'doiTemplate' => 'setDoiTemplate' + 'html_content' => 'setHtmlContent', + 'created_at' => 'setCreatedAt', + 'modified_at' => 'setModifiedAt', + 'doi_template' => 'setDoiTemplate' ]; /** @@ -165,16 +165,16 @@ public static function swaggerFormats() 'id' => 'getId', 'name' => 'getName', 'subject' => 'getSubject', - 'isActive' => 'getIsActive', - 'testSent' => 'getTestSent', + 'is_active' => 'getIsActive', + 'test_sent' => 'getTestSent', 'sender' => 'getSender', - 'replyTo' => 'getReplyTo', - 'toField' => 'getToField', + 'reply_to' => 'getReplyTo', + 'to_field' => 'getToField', 'tag' => 'getTag', - 'htmlContent' => 'getHtmlContent', - 'createdAt' => 'getCreatedAt', - 'modifiedAt' => 'getModifiedAt', - 'doiTemplate' => 'getDoiTemplate' + 'html_content' => 'getHtmlContent', + 'created_at' => 'getCreatedAt', + 'modified_at' => 'getModifiedAt', + 'doi_template' => 'getDoiTemplate' ]; /** @@ -240,16 +240,16 @@ public function __construct(array $data = null) $this->container['id'] = isset($data['id']) ? $data['id'] : null; $this->container['name'] = isset($data['name']) ? $data['name'] : null; $this->container['subject'] = isset($data['subject']) ? $data['subject'] : null; - $this->container['isActive'] = isset($data['isActive']) ? $data['isActive'] : null; - $this->container['testSent'] = isset($data['testSent']) ? $data['testSent'] : null; + $this->container['is_active'] = isset($data['is_active']) ? $data['is_active'] : null; + $this->container['test_sent'] = isset($data['test_sent']) ? $data['test_sent'] : null; $this->container['sender'] = isset($data['sender']) ? $data['sender'] : null; - $this->container['replyTo'] = isset($data['replyTo']) ? $data['replyTo'] : null; - $this->container['toField'] = isset($data['toField']) ? $data['toField'] : null; + $this->container['reply_to'] = isset($data['reply_to']) ? $data['reply_to'] : null; + $this->container['to_field'] = isset($data['to_field']) ? $data['to_field'] : null; $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; - $this->container['htmlContent'] = isset($data['htmlContent']) ? $data['htmlContent'] : null; - $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; - $this->container['modifiedAt'] = isset($data['modifiedAt']) ? $data['modifiedAt'] : null; - $this->container['doiTemplate'] = isset($data['doiTemplate']) ? $data['doiTemplate'] : null; + $this->container['html_content'] = isset($data['html_content']) ? $data['html_content'] : null; + $this->container['created_at'] = isset($data['created_at']) ? $data['created_at'] : null; + $this->container['modified_at'] = isset($data['modified_at']) ? $data['modified_at'] : null; + $this->container['doi_template'] = isset($data['doi_template']) ? $data['doi_template'] : null; } /** @@ -270,32 +270,32 @@ public function listInvalidProperties() if ($this->container['subject'] === null) { $invalidProperties[] = "'subject' can't be null"; } - if ($this->container['isActive'] === null) { - $invalidProperties[] = "'isActive' can't be null"; + if ($this->container['is_active'] === null) { + $invalidProperties[] = "'is_active' can't be null"; } - if ($this->container['testSent'] === null) { - $invalidProperties[] = "'testSent' can't be null"; + if ($this->container['test_sent'] === null) { + $invalidProperties[] = "'test_sent' can't be null"; } if ($this->container['sender'] === null) { $invalidProperties[] = "'sender' can't be null"; } - if ($this->container['replyTo'] === null) { - $invalidProperties[] = "'replyTo' can't be null"; + if ($this->container['reply_to'] === null) { + $invalidProperties[] = "'reply_to' can't be null"; } - if ($this->container['toField'] === null) { - $invalidProperties[] = "'toField' can't be null"; + if ($this->container['to_field'] === null) { + $invalidProperties[] = "'to_field' can't be null"; } if ($this->container['tag'] === null) { $invalidProperties[] = "'tag' can't be null"; } - if ($this->container['htmlContent'] === null) { - $invalidProperties[] = "'htmlContent' can't be null"; + if ($this->container['html_content'] === null) { + $invalidProperties[] = "'html_content' can't be null"; } - if ($this->container['createdAt'] === null) { - $invalidProperties[] = "'createdAt' can't be null"; + if ($this->container['created_at'] === null) { + $invalidProperties[] = "'created_at' can't be null"; } - if ($this->container['modifiedAt'] === null) { - $invalidProperties[] = "'modifiedAt' can't be null"; + if ($this->container['modified_at'] === null) { + $invalidProperties[] = "'modified_at' can't be null"; } return $invalidProperties; } @@ -385,49 +385,49 @@ public function setSubject($subject) } /** - * Gets isActive + * Gets is_active * * @return bool */ public function getIsActive() { - return $this->container['isActive']; + return $this->container['is_active']; } /** - * Sets isActive + * Sets is_active * - * @param bool $isActive Status of template (true=active, false=inactive) + * @param bool $is_active Status of template (true=active, false=inactive) * * @return $this */ - public function setIsActive($isActive) + public function setIsActive($is_active) { - $this->container['isActive'] = $isActive; + $this->container['is_active'] = $is_active; return $this; } /** - * Gets testSent + * Gets test_sent * * @return bool */ public function getTestSent() { - return $this->container['testSent']; + return $this->container['test_sent']; } /** - * Sets testSent + * Sets test_sent * - * @param bool $testSent Status of test sending for the template (true=test email has been sent, false=test email has not been sent) + * @param bool $test_sent Status of test sending for the template (true=test email has been sent, false=test email has not been sent) * * @return $this */ - public function setTestSent($testSent) + public function setTestSent($test_sent) { - $this->container['testSent'] = $testSent; + $this->container['test_sent'] = $test_sent; return $this; } @@ -457,49 +457,49 @@ public function setSender($sender) } /** - * Gets replyTo + * Gets reply_to * * @return string */ public function getReplyTo() { - return $this->container['replyTo']; + return $this->container['reply_to']; } /** - * Sets replyTo + * Sets reply_to * - * @param string $replyTo Email defined as the \"Reply to\" for the template + * @param string $reply_to Email defined as the \"Reply to\" for the template * * @return $this */ - public function setReplyTo($replyTo) + public function setReplyTo($reply_to) { - $this->container['replyTo'] = $replyTo; + $this->container['reply_to'] = $reply_to; return $this; } /** - * Gets toField + * Gets to_field * * @return string */ public function getToField() { - return $this->container['toField']; + return $this->container['to_field']; } /** - * Sets toField + * Sets to_field * - * @param string $toField Customisation of the \"to\" field for the template + * @param string $to_field Customisation of the \"to\" field for the template * * @return $this */ - public function setToField($toField) + public function setToField($to_field) { - $this->container['toField'] = $toField; + $this->container['to_field'] = $to_field; return $this; } @@ -529,97 +529,97 @@ public function setTag($tag) } /** - * Gets htmlContent + * Gets html_content * * @return string */ public function getHtmlContent() { - return $this->container['htmlContent']; + return $this->container['html_content']; } /** - * Sets htmlContent + * Sets html_content * - * @param string $htmlContent HTML content of the template + * @param string $html_content HTML content of the template * * @return $this */ - public function setHtmlContent($htmlContent) + public function setHtmlContent($html_content) { - $this->container['htmlContent'] = $htmlContent; + $this->container['html_content'] = $html_content; return $this; } /** - * Gets createdAt + * Gets created_at * - * @return string + * @return \DateTime */ public function getCreatedAt() { - return $this->container['createdAt']; + return $this->container['created_at']; } /** - * Sets createdAt + * Sets created_at * - * @param string $createdAt Creation UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @param \DateTime $created_at Creation UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ) * * @return $this */ - public function setCreatedAt($createdAt) + public function setCreatedAt($created_at) { - $this->container['createdAt'] = $createdAt; + $this->container['created_at'] = $created_at; return $this; } /** - * Gets modifiedAt + * Gets modified_at * - * @return string + * @return \DateTime */ public function getModifiedAt() { - return $this->container['modifiedAt']; + return $this->container['modified_at']; } /** - * Sets modifiedAt + * Sets modified_at * - * @param string $modifiedAt Last modification UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @param \DateTime $modified_at Last modification UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ) * * @return $this */ - public function setModifiedAt($modifiedAt) + public function setModifiedAt($modified_at) { - $this->container['modifiedAt'] = $modifiedAt; + $this->container['modified_at'] = $modified_at; return $this; } /** - * Gets doiTemplate + * Gets doi_template * * @return bool */ public function getDoiTemplate() { - return $this->container['doiTemplate']; + return $this->container['doi_template']; } /** - * Sets doiTemplate + * Sets doi_template * - * @param bool $doiTemplate It is true if template is a valid Double opt-in (DOI) template, otherwise it is false. This field will be available only in case of single template detail call. + * @param bool $doi_template It is true if template is a valid Double opt-in (DOI) template, otherwise it is false. This field will be available only in case of single template detail call. * * @return $this */ - public function setDoiTemplate($doiTemplate) + public function setDoiTemplate($doi_template) { - $this->container['doiTemplate'] = $doiTemplate; + $this->container['doi_template'] = $doi_template; return $this; } @@ -630,6 +630,7 @@ public function setDoiTemplate($doiTemplate) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -642,6 +643,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -655,6 +657,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -671,6 +674,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetSmtpTemplateOverviewSender.php b/lib/Model/GetSmtpTemplateOverviewSender.php index d16d543d..f23c5410 100644 --- a/lib/Model/GetSmtpTemplateOverviewSender.php +++ b/lib/Model/GetSmtpTemplateOverviewSender.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -294,6 +294,7 @@ public function setId($id) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -306,6 +307,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -319,6 +321,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -335,6 +338,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetSmtpTemplates.php b/lib/Model/GetSmtpTemplates.php index 7dfcf63e..514f4b11 100644 --- a/lib/Model/GetSmtpTemplates.php +++ b/lib/Model/GetSmtpTemplates.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -264,6 +264,7 @@ public function setTemplates($templates) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -276,6 +277,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -289,6 +291,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -305,6 +308,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetSsoToken.php b/lib/Model/GetSsoToken.php index c60a18d2..ff0a2c96 100644 --- a/lib/Model/GetSsoToken.php +++ b/lib/Model/GetSsoToken.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -220,7 +220,7 @@ public function getToken() /** * Sets token * - * @param string $token Session token, it will remain valid for 15 days. + * @param string $token Session token. It will remain valid for a short period of time only. * * @return $this */ @@ -237,6 +237,7 @@ public function setToken($token) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -249,6 +250,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -262,6 +264,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -278,6 +281,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetStatsByBrowser.php b/lib/Model/GetStatsByBrowser.php index 45adbd2b..f231f886 100644 --- a/lib/Model/GetStatsByBrowser.php +++ b/lib/Model/GetStatsByBrowser.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -209,6 +209,7 @@ public function valid() * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -221,6 +222,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -234,6 +236,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -250,6 +253,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetStatsByDevice.php b/lib/Model/GetStatsByDevice.php index 4fe00e82..e2f7f1c9 100644 --- a/lib/Model/GetStatsByDevice.php +++ b/lib/Model/GetStatsByDevice.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -324,6 +324,7 @@ public function setUnknown($unknown) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -336,6 +337,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -349,6 +351,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -365,6 +368,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetStatsByDomain.php b/lib/Model/GetStatsByDomain.php index deebe249..10e4343b 100644 --- a/lib/Model/GetStatsByDomain.php +++ b/lib/Model/GetStatsByDomain.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -209,6 +209,7 @@ public function valid() * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -221,6 +222,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -234,6 +236,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -250,6 +253,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetTransacAggregatedSmsReport.php b/lib/Model/GetTransacAggregatedSmsReport.php index 9338dc83..908d2cab 100644 --- a/lib/Model/GetTransacAggregatedSmsReport.php +++ b/lib/Model/GetTransacAggregatedSmsReport.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -60,8 +60,8 @@ class GetTransacAggregatedSmsReport implements ModelInterface, ArrayAccess 'range' => 'string', 'requests' => 'int', 'delivered' => 'int', - 'hardBounces' => 'int', - 'softBounces' => 'int', + 'hard_bounces' => 'int', + 'soft_bounces' => 'int', 'blocked' => 'int', 'unsubscribed' => 'int', 'replied' => 'int', @@ -78,8 +78,8 @@ class GetTransacAggregatedSmsReport implements ModelInterface, ArrayAccess 'range' => null, 'requests' => 'int64', 'delivered' => 'int64', - 'hardBounces' => 'int64', - 'softBounces' => 'int64', + 'hard_bounces' => 'int64', + 'soft_bounces' => 'int64', 'blocked' => 'int64', 'unsubscribed' => 'int64', 'replied' => 'int64', @@ -117,8 +117,8 @@ public static function swaggerFormats() 'range' => 'range', 'requests' => 'requests', 'delivered' => 'delivered', - 'hardBounces' => 'hardBounces', - 'softBounces' => 'softBounces', + 'hard_bounces' => 'hardBounces', + 'soft_bounces' => 'softBounces', 'blocked' => 'blocked', 'unsubscribed' => 'unsubscribed', 'replied' => 'replied', @@ -135,8 +135,8 @@ public static function swaggerFormats() 'range' => 'setRange', 'requests' => 'setRequests', 'delivered' => 'setDelivered', - 'hardBounces' => 'setHardBounces', - 'softBounces' => 'setSoftBounces', + 'hard_bounces' => 'setHardBounces', + 'soft_bounces' => 'setSoftBounces', 'blocked' => 'setBlocked', 'unsubscribed' => 'setUnsubscribed', 'replied' => 'setReplied', @@ -153,8 +153,8 @@ public static function swaggerFormats() 'range' => 'getRange', 'requests' => 'getRequests', 'delivered' => 'getDelivered', - 'hardBounces' => 'getHardBounces', - 'softBounces' => 'getSoftBounces', + 'hard_bounces' => 'getHardBounces', + 'soft_bounces' => 'getSoftBounces', 'blocked' => 'getBlocked', 'unsubscribed' => 'getUnsubscribed', 'replied' => 'getReplied', @@ -225,8 +225,8 @@ public function __construct(array $data = null) $this->container['range'] = isset($data['range']) ? $data['range'] : null; $this->container['requests'] = isset($data['requests']) ? $data['requests'] : null; $this->container['delivered'] = isset($data['delivered']) ? $data['delivered'] : null; - $this->container['hardBounces'] = isset($data['hardBounces']) ? $data['hardBounces'] : null; - $this->container['softBounces'] = isset($data['softBounces']) ? $data['softBounces'] : null; + $this->container['hard_bounces'] = isset($data['hard_bounces']) ? $data['hard_bounces'] : null; + $this->container['soft_bounces'] = isset($data['soft_bounces']) ? $data['soft_bounces'] : null; $this->container['blocked'] = isset($data['blocked']) ? $data['blocked'] : null; $this->container['unsubscribed'] = isset($data['unsubscribed']) ? $data['unsubscribed'] : null; $this->container['replied'] = isset($data['replied']) ? $data['replied'] : null; @@ -243,6 +243,36 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['range'] === null) { + $invalidProperties[] = "'range' can't be null"; + } + if ($this->container['requests'] === null) { + $invalidProperties[] = "'requests' can't be null"; + } + if ($this->container['delivered'] === null) { + $invalidProperties[] = "'delivered' can't be null"; + } + if ($this->container['hard_bounces'] === null) { + $invalidProperties[] = "'hard_bounces' can't be null"; + } + if ($this->container['soft_bounces'] === null) { + $invalidProperties[] = "'soft_bounces' can't be null"; + } + if ($this->container['blocked'] === null) { + $invalidProperties[] = "'blocked' can't be null"; + } + if ($this->container['unsubscribed'] === null) { + $invalidProperties[] = "'unsubscribed' can't be null"; + } + if ($this->container['replied'] === null) { + $invalidProperties[] = "'replied' can't be null"; + } + if ($this->container['accepted'] === null) { + $invalidProperties[] = "'accepted' can't be null"; + } + if ($this->container['rejected'] === null) { + $invalidProperties[] = "'rejected' can't be null"; + } return $invalidProperties; } @@ -331,49 +361,49 @@ public function setDelivered($delivered) } /** - * Gets hardBounces + * Gets hard_bounces * * @return int */ public function getHardBounces() { - return $this->container['hardBounces']; + return $this->container['hard_bounces']; } /** - * Sets hardBounces + * Sets hard_bounces * - * @param int $hardBounces Number of hardbounces for the timeframe + * @param int $hard_bounces Number of hardbounces for the timeframe * * @return $this */ - public function setHardBounces($hardBounces) + public function setHardBounces($hard_bounces) { - $this->container['hardBounces'] = $hardBounces; + $this->container['hard_bounces'] = $hard_bounces; return $this; } /** - * Gets softBounces + * Gets soft_bounces * * @return int */ public function getSoftBounces() { - return $this->container['softBounces']; + return $this->container['soft_bounces']; } /** - * Sets softBounces + * Sets soft_bounces * - * @param int $softBounces Number of softbounces for the timeframe + * @param int $soft_bounces Number of softbounces for the timeframe * * @return $this */ - public function setSoftBounces($softBounces) + public function setSoftBounces($soft_bounces) { - $this->container['softBounces'] = $softBounces; + $this->container['soft_bounces'] = $soft_bounces; return $this; } @@ -504,6 +534,7 @@ public function setRejected($rejected) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -516,6 +547,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -529,6 +561,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -545,6 +578,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetTransacBlockedContacts.php b/lib/Model/GetTransacBlockedContacts.php index aa41b05f..bebd4850 100644 --- a/lib/Model/GetTransacBlockedContacts.php +++ b/lib/Model/GetTransacBlockedContacts.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -264,6 +264,7 @@ public function setContacts($contacts) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -276,6 +277,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -289,6 +291,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -305,6 +308,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetTransacBlockedContactsContacts.php b/lib/Model/GetTransacBlockedContactsContacts.php index 8202cee0..9916cc63 100644 --- a/lib/Model/GetTransacBlockedContactsContacts.php +++ b/lib/Model/GetTransacBlockedContactsContacts.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -58,9 +58,9 @@ class GetTransacBlockedContactsContacts implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'email' => 'string', - 'senderEmail' => 'string', + 'sender_email' => 'string', 'reason' => '\SendinBlue\Client\Model\GetTransacBlockedContactsReason', - 'blockedAt' => 'string' + 'blocked_at' => '\DateTime' ]; /** @@ -70,9 +70,9 @@ class GetTransacBlockedContactsContacts implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'email' => 'email', - 'senderEmail' => 'email', + 'sender_email' => 'email', 'reason' => null, - 'blockedAt' => null + 'blocked_at' => 'date-time' ]; /** @@ -103,9 +103,9 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'email' => 'email', - 'senderEmail' => 'senderEmail', + 'sender_email' => 'senderEmail', 'reason' => 'reason', - 'blockedAt' => 'blockedAt' + 'blocked_at' => 'blockedAt' ]; /** @@ -115,9 +115,9 @@ public static function swaggerFormats() */ protected static $setters = [ 'email' => 'setEmail', - 'senderEmail' => 'setSenderEmail', + 'sender_email' => 'setSenderEmail', 'reason' => 'setReason', - 'blockedAt' => 'setBlockedAt' + 'blocked_at' => 'setBlockedAt' ]; /** @@ -127,9 +127,9 @@ public static function swaggerFormats() */ protected static $getters = [ 'email' => 'getEmail', - 'senderEmail' => 'getSenderEmail', + 'sender_email' => 'getSenderEmail', 'reason' => 'getReason', - 'blockedAt' => 'getBlockedAt' + 'blocked_at' => 'getBlockedAt' ]; /** @@ -193,9 +193,9 @@ public function getModelName() public function __construct(array $data = null) { $this->container['email'] = isset($data['email']) ? $data['email'] : null; - $this->container['senderEmail'] = isset($data['senderEmail']) ? $data['senderEmail'] : null; + $this->container['sender_email'] = isset($data['sender_email']) ? $data['sender_email'] : null; $this->container['reason'] = isset($data['reason']) ? $data['reason'] : null; - $this->container['blockedAt'] = isset($data['blockedAt']) ? $data['blockedAt'] : null; + $this->container['blocked_at'] = isset($data['blocked_at']) ? $data['blocked_at'] : null; } /** @@ -210,14 +210,14 @@ public function listInvalidProperties() if ($this->container['email'] === null) { $invalidProperties[] = "'email' can't be null"; } - if ($this->container['senderEmail'] === null) { - $invalidProperties[] = "'senderEmail' can't be null"; + if ($this->container['sender_email'] === null) { + $invalidProperties[] = "'sender_email' can't be null"; } if ($this->container['reason'] === null) { $invalidProperties[] = "'reason' can't be null"; } - if ($this->container['blockedAt'] === null) { - $invalidProperties[] = "'blockedAt' can't be null"; + if ($this->container['blocked_at'] === null) { + $invalidProperties[] = "'blocked_at' can't be null"; } return $invalidProperties; } @@ -259,25 +259,25 @@ public function setEmail($email) } /** - * Gets senderEmail + * Gets sender_email * * @return string */ public function getSenderEmail() { - return $this->container['senderEmail']; + return $this->container['sender_email']; } /** - * Sets senderEmail + * Sets sender_email * - * @param string $senderEmail Sender email address of the blocked or unsubscribed contact + * @param string $sender_email Sender email address of the blocked or unsubscribed contact * * @return $this */ - public function setSenderEmail($senderEmail) + public function setSenderEmail($sender_email) { - $this->container['senderEmail'] = $senderEmail; + $this->container['sender_email'] = $sender_email; return $this; } @@ -307,25 +307,25 @@ public function setReason($reason) } /** - * Gets blockedAt + * Gets blocked_at * - * @return string + * @return \DateTime */ public function getBlockedAt() { - return $this->container['blockedAt']; + return $this->container['blocked_at']; } /** - * Sets blockedAt + * Sets blocked_at * - * @param string $blockedAt Date when the contact was blocked or unsubscribed on + * @param \DateTime $blocked_at Date when the contact was blocked or unsubscribed on * * @return $this */ - public function setBlockedAt($blockedAt) + public function setBlockedAt($blocked_at) { - $this->container['blockedAt'] = $blockedAt; + $this->container['blocked_at'] = $blocked_at; return $this; } @@ -336,6 +336,7 @@ public function setBlockedAt($blockedAt) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -348,6 +349,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -361,6 +363,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -377,6 +380,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetTransacBlockedContactsReason.php b/lib/Model/GetTransacBlockedContactsReason.php index 33e2fd31..3e9d2621 100644 --- a/lib/Model/GetTransacBlockedContactsReason.php +++ b/lib/Model/GetTransacBlockedContactsReason.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -305,6 +305,7 @@ public function setMessage($message) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -317,6 +318,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -330,6 +332,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -346,6 +349,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetTransacEmailContent.php b/lib/Model/GetTransacEmailContent.php index a6e11aaf..79fd08ab 100644 --- a/lib/Model/GetTransacEmailContent.php +++ b/lib/Model/GetTransacEmailContent.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -59,11 +59,11 @@ class GetTransacEmailContent implements ModelInterface, ArrayAccess protected static $swaggerTypes = [ 'email' => 'string', 'subject' => 'string', - 'templateId' => 'int', - 'date' => 'string', + 'template_id' => 'int', + 'date' => '\DateTime', 'events' => '\SendinBlue\Client\Model\GetTransacEmailContentEvents[]', 'body' => 'string', - 'attachmentCount' => 'int' + 'attachment_count' => 'int' ]; /** @@ -74,11 +74,11 @@ class GetTransacEmailContent implements ModelInterface, ArrayAccess protected static $swaggerFormats = [ 'email' => 'email', 'subject' => null, - 'templateId' => 'int64', - 'date' => null, + 'template_id' => 'int64', + 'date' => 'date-time', 'events' => null, 'body' => null, - 'attachmentCount' => 'int64' + 'attachment_count' => 'int64' ]; /** @@ -110,11 +110,11 @@ public static function swaggerFormats() protected static $attributeMap = [ 'email' => 'email', 'subject' => 'subject', - 'templateId' => 'templateId', + 'template_id' => 'templateId', 'date' => 'date', 'events' => 'events', 'body' => 'body', - 'attachmentCount' => 'attachmentCount' + 'attachment_count' => 'attachmentCount' ]; /** @@ -125,11 +125,11 @@ public static function swaggerFormats() protected static $setters = [ 'email' => 'setEmail', 'subject' => 'setSubject', - 'templateId' => 'setTemplateId', + 'template_id' => 'setTemplateId', 'date' => 'setDate', 'events' => 'setEvents', 'body' => 'setBody', - 'attachmentCount' => 'setAttachmentCount' + 'attachment_count' => 'setAttachmentCount' ]; /** @@ -140,11 +140,11 @@ public static function swaggerFormats() protected static $getters = [ 'email' => 'getEmail', 'subject' => 'getSubject', - 'templateId' => 'getTemplateId', + 'template_id' => 'getTemplateId', 'date' => 'getDate', 'events' => 'getEvents', 'body' => 'getBody', - 'attachmentCount' => 'getAttachmentCount' + 'attachment_count' => 'getAttachmentCount' ]; /** @@ -209,11 +209,11 @@ public function __construct(array $data = null) { $this->container['email'] = isset($data['email']) ? $data['email'] : null; $this->container['subject'] = isset($data['subject']) ? $data['subject'] : null; - $this->container['templateId'] = isset($data['templateId']) ? $data['templateId'] : null; + $this->container['template_id'] = isset($data['template_id']) ? $data['template_id'] : null; $this->container['date'] = isset($data['date']) ? $data['date'] : null; $this->container['events'] = isset($data['events']) ? $data['events'] : null; $this->container['body'] = isset($data['body']) ? $data['body'] : null; - $this->container['attachmentCount'] = isset($data['attachmentCount']) ? $data['attachmentCount'] : null; + $this->container['attachment_count'] = isset($data['attachment_count']) ? $data['attachment_count'] : null; } /** @@ -240,8 +240,8 @@ public function listInvalidProperties() if ($this->container['body'] === null) { $invalidProperties[] = "'body' can't be null"; } - if ($this->container['attachmentCount'] === null) { - $invalidProperties[] = "'attachmentCount' can't be null"; + if ($this->container['attachment_count'] === null) { + $invalidProperties[] = "'attachment_count' can't be null"; } return $invalidProperties; } @@ -307,25 +307,25 @@ public function setSubject($subject) } /** - * Gets templateId + * Gets template_id * * @return int */ public function getTemplateId() { - return $this->container['templateId']; + return $this->container['template_id']; } /** - * Sets templateId + * Sets template_id * - * @param int $templateId Id of the template + * @param int $template_id Id of the template * * @return $this */ - public function setTemplateId($templateId) + public function setTemplateId($template_id) { - $this->container['templateId'] = $templateId; + $this->container['template_id'] = $template_id; return $this; } @@ -333,7 +333,7 @@ public function setTemplateId($templateId) /** * Gets date * - * @return string + * @return \DateTime */ public function getDate() { @@ -343,7 +343,7 @@ public function getDate() /** * Sets date * - * @param string $date Date on which transactional email was sent + * @param \DateTime $date Date on which transactional email was sent * * @return $this */ @@ -403,25 +403,25 @@ public function setBody($body) } /** - * Gets attachmentCount + * Gets attachment_count * * @return int */ public function getAttachmentCount() { - return $this->container['attachmentCount']; + return $this->container['attachment_count']; } /** - * Sets attachmentCount + * Sets attachment_count * - * @param int $attachmentCount Count of the attachments that were sent in the email + * @param int $attachment_count Count of the attachments that were sent in the email * * @return $this */ - public function setAttachmentCount($attachmentCount) + public function setAttachmentCount($attachment_count) { - $this->container['attachmentCount'] = $attachmentCount; + $this->container['attachment_count'] = $attachment_count; return $this; } @@ -432,6 +432,7 @@ public function setAttachmentCount($attachmentCount) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -444,6 +445,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -457,6 +459,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -473,6 +476,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetTransacEmailContentEvents.php b/lib/Model/GetTransacEmailContentEvents.php index 5f3c7194..1e299c34 100644 --- a/lib/Model/GetTransacEmailContentEvents.php +++ b/lib/Model/GetTransacEmailContentEvents.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -58,7 +58,7 @@ class GetTransacEmailContentEvents implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'name' => 'string', - 'time' => 'string' + 'time' => '\DateTime' ]; /** @@ -68,7 +68,7 @@ class GetTransacEmailContentEvents implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'name' => null, - 'time' => null + 'time' => 'date-time' ]; /** @@ -243,7 +243,7 @@ public function setName($name) /** * Gets time * - * @return string + * @return \DateTime */ public function getTime() { @@ -253,7 +253,7 @@ public function getTime() /** * Sets time * - * @param string $time Time at which the event occurred + * @param \DateTime $time Time at which the event occurred * * @return $this */ @@ -270,6 +270,7 @@ public function setTime($time) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -282,6 +283,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -295,6 +297,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -311,6 +314,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetTransacEmailsList.php b/lib/Model/GetTransacEmailsList.php index 14ba3b45..eff3d91e 100644 --- a/lib/Model/GetTransacEmailsList.php +++ b/lib/Model/GetTransacEmailsList.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -57,8 +57,7 @@ class GetTransacEmailsList implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'count' => 'int', - 'transactionalEmails' => '\SendinBlue\Client\Model\GetTransacEmailsListTransactionalEmails[]' + 'transactional_emails' => '\SendinBlue\Client\Model\GetTransacEmailsListTransactionalEmails[]' ]; /** @@ -67,8 +66,7 @@ class GetTransacEmailsList implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'count' => 'int64', - 'transactionalEmails' => null + 'transactional_emails' => null ]; /** @@ -98,8 +96,7 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'count' => 'count', - 'transactionalEmails' => 'transactionalEmails' + 'transactional_emails' => 'transactionalEmails' ]; /** @@ -108,8 +105,7 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'count' => 'setCount', - 'transactionalEmails' => 'setTransactionalEmails' + 'transactional_emails' => 'setTransactionalEmails' ]; /** @@ -118,8 +114,7 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'count' => 'getCount', - 'transactionalEmails' => 'getTransactionalEmails' + 'transactional_emails' => 'getTransactionalEmails' ]; /** @@ -182,8 +177,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['count'] = isset($data['count']) ? $data['count'] : null; - $this->container['transactionalEmails'] = isset($data['transactionalEmails']) ? $data['transactionalEmails'] : null; + $this->container['transactional_emails'] = isset($data['transactional_emails']) ? $data['transactional_emails'] : null; } /** @@ -211,49 +205,25 @@ public function valid() /** - * Gets count - * - * @return int - */ - public function getCount() - { - return $this->container['count']; - } - - /** - * Sets count - * - * @param int $count Total number of transactional emails available on your account according to the passed filter - * - * @return $this - */ - public function setCount($count) - { - $this->container['count'] = $count; - - return $this; - } - - /** - * Gets transactionalEmails + * Gets transactional_emails * * @return \SendinBlue\Client\Model\GetTransacEmailsListTransactionalEmails[] */ public function getTransactionalEmails() { - return $this->container['transactionalEmails']; + return $this->container['transactional_emails']; } /** - * Sets transactionalEmails + * Sets transactional_emails * - * @param \SendinBlue\Client\Model\GetTransacEmailsListTransactionalEmails[] $transactionalEmails transactionalEmails + * @param \SendinBlue\Client\Model\GetTransacEmailsListTransactionalEmails[] $transactional_emails transactional_emails * * @return $this */ - public function setTransactionalEmails($transactionalEmails) + public function setTransactionalEmails($transactional_emails) { - $this->container['transactionalEmails'] = $transactionalEmails; + $this->container['transactional_emails'] = $transactional_emails; return $this; } @@ -264,6 +234,7 @@ public function setTransactionalEmails($transactionalEmails) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -276,6 +247,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -289,6 +261,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -305,6 +278,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetTransacEmailsListTransactionalEmails.php b/lib/Model/GetTransacEmailsListTransactionalEmails.php index 7a5776ba..55c61ffa 100644 --- a/lib/Model/GetTransacEmailsListTransactionalEmails.php +++ b/lib/Model/GetTransacEmailsListTransactionalEmails.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -59,10 +59,10 @@ class GetTransacEmailsListTransactionalEmails implements ModelInterface, ArrayAc protected static $swaggerTypes = [ 'email' => 'string', 'subject' => 'string', - 'templateId' => 'int', - 'messageId' => 'string', + 'template_id' => 'int', + 'message_id' => 'string', 'uuid' => 'string', - 'date' => 'string', + 'date' => '\DateTime', 'from' => 'string', 'tags' => 'string[]' ]; @@ -75,10 +75,10 @@ class GetTransacEmailsListTransactionalEmails implements ModelInterface, ArrayAc protected static $swaggerFormats = [ 'email' => 'email', 'subject' => null, - 'templateId' => 'int64', - 'messageId' => null, + 'template_id' => 'int64', + 'message_id' => null, 'uuid' => null, - 'date' => null, + 'date' => 'date-time', 'from' => 'email', 'tags' => null ]; @@ -112,8 +112,8 @@ public static function swaggerFormats() protected static $attributeMap = [ 'email' => 'email', 'subject' => 'subject', - 'templateId' => 'templateId', - 'messageId' => 'messageId', + 'template_id' => 'templateId', + 'message_id' => 'messageId', 'uuid' => 'uuid', 'date' => 'date', 'from' => 'from', @@ -128,8 +128,8 @@ public static function swaggerFormats() protected static $setters = [ 'email' => 'setEmail', 'subject' => 'setSubject', - 'templateId' => 'setTemplateId', - 'messageId' => 'setMessageId', + 'template_id' => 'setTemplateId', + 'message_id' => 'setMessageId', 'uuid' => 'setUuid', 'date' => 'setDate', 'from' => 'setFrom', @@ -144,8 +144,8 @@ public static function swaggerFormats() protected static $getters = [ 'email' => 'getEmail', 'subject' => 'getSubject', - 'templateId' => 'getTemplateId', - 'messageId' => 'getMessageId', + 'template_id' => 'getTemplateId', + 'message_id' => 'getMessageId', 'uuid' => 'getUuid', 'date' => 'getDate', 'from' => 'getFrom', @@ -214,8 +214,8 @@ public function __construct(array $data = null) { $this->container['email'] = isset($data['email']) ? $data['email'] : null; $this->container['subject'] = isset($data['subject']) ? $data['subject'] : null; - $this->container['templateId'] = isset($data['templateId']) ? $data['templateId'] : null; - $this->container['messageId'] = isset($data['messageId']) ? $data['messageId'] : null; + $this->container['template_id'] = isset($data['template_id']) ? $data['template_id'] : null; + $this->container['message_id'] = isset($data['message_id']) ? $data['message_id'] : null; $this->container['uuid'] = isset($data['uuid']) ? $data['uuid'] : null; $this->container['date'] = isset($data['date']) ? $data['date'] : null; $this->container['from'] = isset($data['from']) ? $data['from'] : null; @@ -237,8 +237,8 @@ public function listInvalidProperties() if ($this->container['subject'] === null) { $invalidProperties[] = "'subject' can't be null"; } - if ($this->container['messageId'] === null) { - $invalidProperties[] = "'messageId' can't be null"; + if ($this->container['message_id'] === null) { + $invalidProperties[] = "'message_id' can't be null"; } if ($this->container['uuid'] === null) { $invalidProperties[] = "'uuid' can't be null"; @@ -310,49 +310,49 @@ public function setSubject($subject) } /** - * Gets templateId + * Gets template_id * * @return int */ public function getTemplateId() { - return $this->container['templateId']; + return $this->container['template_id']; } /** - * Sets templateId + * Sets template_id * - * @param int $templateId Id of the template + * @param int $template_id Id of the template * * @return $this */ - public function setTemplateId($templateId) + public function setTemplateId($template_id) { - $this->container['templateId'] = $templateId; + $this->container['template_id'] = $template_id; return $this; } /** - * Gets messageId + * Gets message_id * * @return string */ public function getMessageId() { - return $this->container['messageId']; + return $this->container['message_id']; } /** - * Sets messageId + * Sets message_id * - * @param string $messageId Message Id of the sent email + * @param string $message_id Message Id of the sent email * * @return $this */ - public function setMessageId($messageId) + public function setMessageId($message_id) { - $this->container['messageId'] = $messageId; + $this->container['message_id'] = $message_id; return $this; } @@ -384,7 +384,7 @@ public function setUuid($uuid) /** * Gets date * - * @return string + * @return \DateTime */ public function getDate() { @@ -394,7 +394,7 @@ public function getDate() /** * Sets date * - * @param string $date Date on which transactional email was sent + * @param \DateTime $date Date on which transactional email was sent * * @return $this */ @@ -459,6 +459,7 @@ public function setTags($tags) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -471,6 +472,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -484,6 +486,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -500,6 +503,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetTransacSmsReport.php b/lib/Model/GetTransacSmsReport.php index 8b80f4ae..29cf87d7 100644 --- a/lib/Model/GetTransacSmsReport.php +++ b/lib/Model/GetTransacSmsReport.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -234,6 +234,7 @@ public function setReports($reports) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -246,6 +247,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -259,6 +261,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -275,6 +278,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetTransacSmsReportReports.php b/lib/Model/GetTransacSmsReportReports.php index 74cf91e6..fce0e892 100644 --- a/lib/Model/GetTransacSmsReportReports.php +++ b/lib/Model/GetTransacSmsReportReports.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -60,8 +60,8 @@ class GetTransacSmsReportReports implements ModelInterface, ArrayAccess 'date' => '\DateTime', 'requests' => 'int', 'delivered' => 'int', - 'hardBounces' => 'int', - 'softBounces' => 'int', + 'hard_bounces' => 'int', + 'soft_bounces' => 'int', 'blocked' => 'int', 'unsubscribed' => 'int', 'replied' => 'int', @@ -78,8 +78,8 @@ class GetTransacSmsReportReports implements ModelInterface, ArrayAccess 'date' => 'date', 'requests' => 'int64', 'delivered' => 'int64', - 'hardBounces' => 'int64', - 'softBounces' => 'int64', + 'hard_bounces' => 'int64', + 'soft_bounces' => 'int64', 'blocked' => 'int64', 'unsubscribed' => 'int64', 'replied' => 'int64', @@ -117,8 +117,8 @@ public static function swaggerFormats() 'date' => 'date', 'requests' => 'requests', 'delivered' => 'delivered', - 'hardBounces' => 'hardBounces', - 'softBounces' => 'softBounces', + 'hard_bounces' => 'hardBounces', + 'soft_bounces' => 'softBounces', 'blocked' => 'blocked', 'unsubscribed' => 'unsubscribed', 'replied' => 'replied', @@ -135,8 +135,8 @@ public static function swaggerFormats() 'date' => 'setDate', 'requests' => 'setRequests', 'delivered' => 'setDelivered', - 'hardBounces' => 'setHardBounces', - 'softBounces' => 'setSoftBounces', + 'hard_bounces' => 'setHardBounces', + 'soft_bounces' => 'setSoftBounces', 'blocked' => 'setBlocked', 'unsubscribed' => 'setUnsubscribed', 'replied' => 'setReplied', @@ -153,8 +153,8 @@ public static function swaggerFormats() 'date' => 'getDate', 'requests' => 'getRequests', 'delivered' => 'getDelivered', - 'hardBounces' => 'getHardBounces', - 'softBounces' => 'getSoftBounces', + 'hard_bounces' => 'getHardBounces', + 'soft_bounces' => 'getSoftBounces', 'blocked' => 'getBlocked', 'unsubscribed' => 'getUnsubscribed', 'replied' => 'getReplied', @@ -225,8 +225,8 @@ public function __construct(array $data = null) $this->container['date'] = isset($data['date']) ? $data['date'] : null; $this->container['requests'] = isset($data['requests']) ? $data['requests'] : null; $this->container['delivered'] = isset($data['delivered']) ? $data['delivered'] : null; - $this->container['hardBounces'] = isset($data['hardBounces']) ? $data['hardBounces'] : null; - $this->container['softBounces'] = isset($data['softBounces']) ? $data['softBounces'] : null; + $this->container['hard_bounces'] = isset($data['hard_bounces']) ? $data['hard_bounces'] : null; + $this->container['soft_bounces'] = isset($data['soft_bounces']) ? $data['soft_bounces'] : null; $this->container['blocked'] = isset($data['blocked']) ? $data['blocked'] : null; $this->container['unsubscribed'] = isset($data['unsubscribed']) ? $data['unsubscribed'] : null; $this->container['replied'] = isset($data['replied']) ? $data['replied'] : null; @@ -243,6 +243,36 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['date'] === null) { + $invalidProperties[] = "'date' can't be null"; + } + if ($this->container['requests'] === null) { + $invalidProperties[] = "'requests' can't be null"; + } + if ($this->container['delivered'] === null) { + $invalidProperties[] = "'delivered' can't be null"; + } + if ($this->container['hard_bounces'] === null) { + $invalidProperties[] = "'hard_bounces' can't be null"; + } + if ($this->container['soft_bounces'] === null) { + $invalidProperties[] = "'soft_bounces' can't be null"; + } + if ($this->container['blocked'] === null) { + $invalidProperties[] = "'blocked' can't be null"; + } + if ($this->container['unsubscribed'] === null) { + $invalidProperties[] = "'unsubscribed' can't be null"; + } + if ($this->container['replied'] === null) { + $invalidProperties[] = "'replied' can't be null"; + } + if ($this->container['accepted'] === null) { + $invalidProperties[] = "'accepted' can't be null"; + } + if ($this->container['rejected'] === null) { + $invalidProperties[] = "'rejected' can't be null"; + } return $invalidProperties; } @@ -331,49 +361,49 @@ public function setDelivered($delivered) } /** - * Gets hardBounces + * Gets hard_bounces * * @return int */ public function getHardBounces() { - return $this->container['hardBounces']; + return $this->container['hard_bounces']; } /** - * Sets hardBounces + * Sets hard_bounces * - * @param int $hardBounces Number of hardbounces for the date + * @param int $hard_bounces Number of hardbounces for the date * * @return $this */ - public function setHardBounces($hardBounces) + public function setHardBounces($hard_bounces) { - $this->container['hardBounces'] = $hardBounces; + $this->container['hard_bounces'] = $hard_bounces; return $this; } /** - * Gets softBounces + * Gets soft_bounces * * @return int */ public function getSoftBounces() { - return $this->container['softBounces']; + return $this->container['soft_bounces']; } /** - * Sets softBounces + * Sets soft_bounces * - * @param int $softBounces Number of softbounces for the date + * @param int $soft_bounces Number of softbounces for the date * * @return $this */ - public function setSoftBounces($softBounces) + public function setSoftBounces($soft_bounces) { - $this->container['softBounces'] = $softBounces; + $this->container['soft_bounces'] = $soft_bounces; return $this; } @@ -504,6 +534,7 @@ public function setRejected($rejected) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -516,6 +547,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -529,6 +561,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -545,6 +578,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetWebhook.php b/lib/Model/GetWebhook.php index d37ab7d9..87e42c4f 100644 --- a/lib/Model/GetWebhook.php +++ b/lib/Model/GetWebhook.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -62,8 +62,8 @@ class GetWebhook implements ModelInterface, ArrayAccess 'description' => 'string', 'events' => 'string[]', 'type' => 'string', - 'createdAt' => 'string', - 'modifiedAt' => 'string' + 'created_at' => '\DateTime', + 'modified_at' => '\DateTime' ]; /** @@ -77,8 +77,8 @@ class GetWebhook implements ModelInterface, ArrayAccess 'description' => null, 'events' => null, 'type' => null, - 'createdAt' => null, - 'modifiedAt' => null + 'created_at' => 'date-time', + 'modified_at' => 'date-time' ]; /** @@ -113,8 +113,8 @@ public static function swaggerFormats() 'description' => 'description', 'events' => 'events', 'type' => 'type', - 'createdAt' => 'createdAt', - 'modifiedAt' => 'modifiedAt' + 'created_at' => 'createdAt', + 'modified_at' => 'modifiedAt' ]; /** @@ -128,8 +128,8 @@ public static function swaggerFormats() 'description' => 'setDescription', 'events' => 'setEvents', 'type' => 'setType', - 'createdAt' => 'setCreatedAt', - 'modifiedAt' => 'setModifiedAt' + 'created_at' => 'setCreatedAt', + 'modified_at' => 'setModifiedAt' ]; /** @@ -143,8 +143,8 @@ public static function swaggerFormats() 'description' => 'getDescription', 'events' => 'getEvents', 'type' => 'getType', - 'createdAt' => 'getCreatedAt', - 'modifiedAt' => 'getModifiedAt' + 'created_at' => 'getCreatedAt', + 'modified_at' => 'getModifiedAt' ]; /** @@ -227,8 +227,8 @@ public function __construct(array $data = null) $this->container['description'] = isset($data['description']) ? $data['description'] : null; $this->container['events'] = isset($data['events']) ? $data['events'] : null; $this->container['type'] = isset($data['type']) ? $data['type'] : null; - $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; - $this->container['modifiedAt'] = isset($data['modifiedAt']) ? $data['modifiedAt'] : null; + $this->container['created_at'] = isset($data['created_at']) ? $data['created_at'] : null; + $this->container['modified_at'] = isset($data['modified_at']) ? $data['modified_at'] : null; } /** @@ -263,11 +263,11 @@ public function listInvalidProperties() ); } - if ($this->container['createdAt'] === null) { - $invalidProperties[] = "'createdAt' can't be null"; + if ($this->container['created_at'] === null) { + $invalidProperties[] = "'created_at' can't be null"; } - if ($this->container['modifiedAt'] === null) { - $invalidProperties[] = "'modifiedAt' can't be null"; + if ($this->container['modified_at'] === null) { + $invalidProperties[] = "'modified_at' can't be null"; } return $invalidProperties; } @@ -414,49 +414,49 @@ public function setType($type) } /** - * Gets createdAt + * Gets created_at * - * @return string + * @return \DateTime */ public function getCreatedAt() { - return $this->container['createdAt']; + return $this->container['created_at']; } /** - * Sets createdAt + * Sets created_at * - * @param string $createdAt Creation UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @param \DateTime $created_at Creation UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) * * @return $this */ - public function setCreatedAt($createdAt) + public function setCreatedAt($created_at) { - $this->container['createdAt'] = $createdAt; + $this->container['created_at'] = $created_at; return $this; } /** - * Gets modifiedAt + * Gets modified_at * - * @return string + * @return \DateTime */ public function getModifiedAt() { - return $this->container['modifiedAt']; + return $this->container['modified_at']; } /** - * Sets modifiedAt + * Sets modified_at * - * @param string $modifiedAt Last modification UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @param \DateTime $modified_at Last modification UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) * * @return $this */ - public function setModifiedAt($modifiedAt) + public function setModifiedAt($modified_at) { - $this->container['modifiedAt'] = $modifiedAt; + $this->container['modified_at'] = $modified_at; return $this; } @@ -467,6 +467,7 @@ public function setModifiedAt($modifiedAt) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -479,6 +480,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -492,6 +494,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -508,6 +511,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/GetWebhooks.php b/lib/Model/GetWebhooks.php index 800f4618..c101db6c 100644 --- a/lib/Model/GetWebhooks.php +++ b/lib/Model/GetWebhooks.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -237,6 +237,7 @@ public function setWebhooks($webhooks) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -249,6 +250,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -262,6 +264,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -278,6 +281,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/ManageIp.php b/lib/Model/ManageIp.php index 08e96aa2..659dd188 100644 --- a/lib/Model/ManageIp.php +++ b/lib/Model/ManageIp.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -234,6 +234,7 @@ public function setIp($ip) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -246,6 +247,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -259,6 +261,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -275,6 +278,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/MasterDetailsResponse.php b/lib/Model/MasterDetailsResponse.php deleted file mode 100644 index af14c7fd..00000000 --- a/lib/Model/MasterDetailsResponse.php +++ /dev/null @@ -1,481 +0,0 @@ - 'string', - 'companyName' => 'string', - 'id' => 'int', - 'currencyCode' => 'string', - 'timezone' => 'string', - 'billingInfo' => '\SendinBlue\Client\Model\MasterDetailsResponseBillingInfo', - 'planInfo' => '\SendinBlue\Client\Model\MasterDetailsResponsePlanInfo' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'email' => null, - 'companyName' => null, - 'id' => 'int64', - 'currencyCode' => null, - 'timezone' => null, - 'billingInfo' => null, - 'planInfo' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'email' => 'email', - 'companyName' => 'companyName', - 'id' => 'id', - 'currencyCode' => 'currencyCode', - 'timezone' => 'timezone', - 'billingInfo' => 'billingInfo', - 'planInfo' => 'planInfo' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'email' => 'setEmail', - 'companyName' => 'setCompanyName', - 'id' => 'setId', - 'currencyCode' => 'setCurrencyCode', - 'timezone' => 'setTimezone', - 'billingInfo' => 'setBillingInfo', - 'planInfo' => 'setPlanInfo' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'email' => 'getEmail', - 'companyName' => 'getCompanyName', - 'id' => 'getId', - 'currencyCode' => 'getCurrencyCode', - 'timezone' => 'getTimezone', - 'billingInfo' => 'getBillingInfo', - 'planInfo' => 'getPlanInfo' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['email'] = isset($data['email']) ? $data['email'] : null; - $this->container['companyName'] = isset($data['companyName']) ? $data['companyName'] : null; - $this->container['id'] = isset($data['id']) ? $data['id'] : null; - $this->container['currencyCode'] = isset($data['currencyCode']) ? $data['currencyCode'] : null; - $this->container['timezone'] = isset($data['timezone']) ? $data['timezone'] : null; - $this->container['billingInfo'] = isset($data['billingInfo']) ? $data['billingInfo'] : null; - $this->container['planInfo'] = isset($data['planInfo']) ? $data['planInfo'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets email - * - * @return string - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string $email Email id of master account - * - * @return $this - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets companyName - * - * @return string - */ - public function getCompanyName() - { - return $this->container['companyName']; - } - - /** - * Sets companyName - * - * @param string $companyName Company name of master account organization - * - * @return $this - */ - public function setCompanyName($companyName) - { - $this->container['companyName'] = $companyName; - - return $this; - } - - /** - * Gets id - * - * @return int - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param int $id Unique identifier of the master account organization - * - * @return $this - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets currencyCode - * - * @return string - */ - public function getCurrencyCode() - { - return $this->container['currencyCode']; - } - - /** - * Sets currencyCode - * - * @param string $currencyCode Currency code of the master account organization - * - * @return $this - */ - public function setCurrencyCode($currencyCode) - { - $this->container['currencyCode'] = $currencyCode; - - return $this; - } - - /** - * Gets timezone - * - * @return string - */ - public function getTimezone() - { - return $this->container['timezone']; - } - - /** - * Sets timezone - * - * @param string $timezone Timezone of the master account organization - * - * @return $this - */ - public function setTimezone($timezone) - { - $this->container['timezone'] = $timezone; - - return $this; - } - - /** - * Gets billingInfo - * - * @return \SendinBlue\Client\Model\MasterDetailsResponseBillingInfo - */ - public function getBillingInfo() - { - return $this->container['billingInfo']; - } - - /** - * Sets billingInfo - * - * @param \SendinBlue\Client\Model\MasterDetailsResponseBillingInfo $billingInfo billingInfo - * - * @return $this - */ - public function setBillingInfo($billingInfo) - { - $this->container['billingInfo'] = $billingInfo; - - return $this; - } - - /** - * Gets planInfo - * - * @return \SendinBlue\Client\Model\MasterDetailsResponsePlanInfo - */ - public function getPlanInfo() - { - return $this->container['planInfo']; - } - - /** - * Sets planInfo - * - * @param \SendinBlue\Client\Model\MasterDetailsResponsePlanInfo $planInfo planInfo - * - * @return $this - */ - public function setPlanInfo($planInfo) - { - $this->container['planInfo'] = $planInfo; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/MasterDetailsResponseBillingInfo.php b/lib/Model/MasterDetailsResponseBillingInfo.php deleted file mode 100644 index f3b618fc..00000000 --- a/lib/Model/MasterDetailsResponseBillingInfo.php +++ /dev/null @@ -1,392 +0,0 @@ - 'string', - 'companyName' => 'string', - 'name' => '\SendinBlue\Client\Model\MasterDetailsResponseBillingInfoName', - 'address' => '\SendinBlue\Client\Model\MasterDetailsResponseBillingInfoAddress' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'email' => null, - 'companyName' => null, - 'name' => null, - 'address' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'email' => 'email', - 'companyName' => 'companyName', - 'name' => 'name', - 'address' => 'address' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'email' => 'setEmail', - 'companyName' => 'setCompanyName', - 'name' => 'setName', - 'address' => 'setAddress' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'email' => 'getEmail', - 'companyName' => 'getCompanyName', - 'name' => 'getName', - 'address' => 'getAddress' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['email'] = isset($data['email']) ? $data['email'] : null; - $this->container['companyName'] = isset($data['companyName']) ? $data['companyName'] : null; - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - $this->container['address'] = isset($data['address']) ? $data['address'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets email - * - * @return string - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string $email Billing email id of master account - * - * @return $this - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets companyName - * - * @return string - */ - public function getCompanyName() - { - return $this->container['companyName']; - } - - /** - * Sets companyName - * - * @param string $companyName Company name of master account - * - * @return $this - */ - public function setCompanyName($companyName) - { - $this->container['companyName'] = $companyName; - - return $this; - } - - /** - * Gets name - * - * @return \SendinBlue\Client\Model\MasterDetailsResponseBillingInfoName - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param \SendinBlue\Client\Model\MasterDetailsResponseBillingInfoName $name name - * - * @return $this - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets address - * - * @return \SendinBlue\Client\Model\MasterDetailsResponseBillingInfoAddress - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param \SendinBlue\Client\Model\MasterDetailsResponseBillingInfoAddress $address address - * - * @return $this - */ - public function setAddress($address) - { - $this->container['address'] = $address; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/MasterDetailsResponseBillingInfoAddress.php b/lib/Model/MasterDetailsResponseBillingInfoAddress.php deleted file mode 100644 index 828bd554..00000000 --- a/lib/Model/MasterDetailsResponseBillingInfoAddress.php +++ /dev/null @@ -1,422 +0,0 @@ - 'string', - 'locality' => 'string', - 'postalCode' => 'string', - 'stateCode' => 'string', - 'countryCode' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'streetAddress' => null, - 'locality' => null, - 'postalCode' => null, - 'stateCode' => null, - 'countryCode' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'streetAddress' => 'streetAddress', - 'locality' => 'locality', - 'postalCode' => 'postalCode', - 'stateCode' => 'stateCode', - 'countryCode' => 'countryCode' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'streetAddress' => 'setStreetAddress', - 'locality' => 'setLocality', - 'postalCode' => 'setPostalCode', - 'stateCode' => 'setStateCode', - 'countryCode' => 'setCountryCode' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'streetAddress' => 'getStreetAddress', - 'locality' => 'getLocality', - 'postalCode' => 'getPostalCode', - 'stateCode' => 'getStateCode', - 'countryCode' => 'getCountryCode' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['streetAddress'] = isset($data['streetAddress']) ? $data['streetAddress'] : null; - $this->container['locality'] = isset($data['locality']) ? $data['locality'] : null; - $this->container['postalCode'] = isset($data['postalCode']) ? $data['postalCode'] : null; - $this->container['stateCode'] = isset($data['stateCode']) ? $data['stateCode'] : null; - $this->container['countryCode'] = isset($data['countryCode']) ? $data['countryCode'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets streetAddress - * - * @return string - */ - public function getStreetAddress() - { - return $this->container['streetAddress']; - } - - /** - * Sets streetAddress - * - * @param string $streetAddress Street address - * - * @return $this - */ - public function setStreetAddress($streetAddress) - { - $this->container['streetAddress'] = $streetAddress; - - return $this; - } - - /** - * Gets locality - * - * @return string - */ - public function getLocality() - { - return $this->container['locality']; - } - - /** - * Sets locality - * - * @param string $locality Locality - * - * @return $this - */ - public function setLocality($locality) - { - $this->container['locality'] = $locality; - - return $this; - } - - /** - * Gets postalCode - * - * @return string - */ - public function getPostalCode() - { - return $this->container['postalCode']; - } - - /** - * Sets postalCode - * - * @param string $postalCode Postal code - * - * @return $this - */ - public function setPostalCode($postalCode) - { - $this->container['postalCode'] = $postalCode; - - return $this; - } - - /** - * Gets stateCode - * - * @return string - */ - public function getStateCode() - { - return $this->container['stateCode']; - } - - /** - * Sets stateCode - * - * @param string $stateCode State code - * - * @return $this - */ - public function setStateCode($stateCode) - { - $this->container['stateCode'] = $stateCode; - - return $this; - } - - /** - * Gets countryCode - * - * @return string - */ - public function getCountryCode() - { - return $this->container['countryCode']; - } - - /** - * Sets countryCode - * - * @param string $countryCode Country code - * - * @return $this - */ - public function setCountryCode($countryCode) - { - $this->container['countryCode'] = $countryCode; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/MasterDetailsResponseBillingInfoName.php b/lib/Model/MasterDetailsResponseBillingInfoName.php deleted file mode 100644 index e742306d..00000000 --- a/lib/Model/MasterDetailsResponseBillingInfoName.php +++ /dev/null @@ -1,332 +0,0 @@ - 'string', - 'familyName' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'givenName' => null, - 'familyName' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'givenName' => 'givenName', - 'familyName' => 'familyName' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'givenName' => 'setGivenName', - 'familyName' => 'setFamilyName' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'givenName' => 'getGivenName', - 'familyName' => 'getFamilyName' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['givenName'] = isset($data['givenName']) ? $data['givenName'] : null; - $this->container['familyName'] = isset($data['familyName']) ? $data['familyName'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets givenName - * - * @return string - */ - public function getGivenName() - { - return $this->container['givenName']; - } - - /** - * Sets givenName - * - * @param string $givenName First name for billing - * - * @return $this - */ - public function setGivenName($givenName) - { - $this->container['givenName'] = $givenName; - - return $this; - } - - /** - * Gets familyName - * - * @return string - */ - public function getFamilyName() - { - return $this->container['familyName']; - } - - /** - * Sets familyName - * - * @param string $familyName Last name for billing - * - * @return $this - */ - public function setFamilyName($familyName) - { - $this->container['familyName'] = $familyName; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/MasterDetailsResponsePlanInfo.php b/lib/Model/MasterDetailsResponsePlanInfo.php deleted file mode 100644 index a818fbfa..00000000 --- a/lib/Model/MasterDetailsResponsePlanInfo.php +++ /dev/null @@ -1,484 +0,0 @@ - 'string', - 'nextBillingAt' => 'int', - 'price' => 'float', - 'planPeriod' => 'string', - 'subAccounts' => 'int', - 'features' => '\SendinBlue\Client\Model\MasterDetailsResponsePlanInfoFeatures[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'currencyCode' => null, - 'nextBillingAt' => 'int64', - 'price' => null, - 'planPeriod' => null, - 'subAccounts' => null, - 'features' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'currencyCode' => 'currencyCode', - 'nextBillingAt' => 'nextBillingAt', - 'price' => 'price', - 'planPeriod' => 'planPeriod', - 'subAccounts' => 'subAccounts', - 'features' => 'features' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'currencyCode' => 'setCurrencyCode', - 'nextBillingAt' => 'setNextBillingAt', - 'price' => 'setPrice', - 'planPeriod' => 'setPlanPeriod', - 'subAccounts' => 'setSubAccounts', - 'features' => 'setFeatures' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'currencyCode' => 'getCurrencyCode', - 'nextBillingAt' => 'getNextBillingAt', - 'price' => 'getPrice', - 'planPeriod' => 'getPlanPeriod', - 'subAccounts' => 'getSubAccounts', - 'features' => 'getFeatures' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - const PLAN_PERIOD_MONTH = 'month'; - const PLAN_PERIOD_YEAR = 'year'; - - - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getPlanPeriodAllowableValues() - { - return [ - self::PLAN_PERIOD_MONTH, - self::PLAN_PERIOD_YEAR, - ]; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['currencyCode'] = isset($data['currencyCode']) ? $data['currencyCode'] : null; - $this->container['nextBillingAt'] = isset($data['nextBillingAt']) ? $data['nextBillingAt'] : null; - $this->container['price'] = isset($data['price']) ? $data['price'] : null; - $this->container['planPeriod'] = isset($data['planPeriod']) ? $data['planPeriod'] : null; - $this->container['subAccounts'] = isset($data['subAccounts']) ? $data['subAccounts'] : null; - $this->container['features'] = isset($data['features']) ? $data['features'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getPlanPeriodAllowableValues(); - if (!is_null($this->container['planPeriod']) && !in_array($this->container['planPeriod'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value for 'planPeriod', must be one of '%s'", - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets currencyCode - * - * @return string - */ - public function getCurrencyCode() - { - return $this->container['currencyCode']; - } - - /** - * Sets currencyCode - * - * @param string $currencyCode Plan currency - * - * @return $this - */ - public function setCurrencyCode($currencyCode) - { - $this->container['currencyCode'] = $currencyCode; - - return $this; - } - - /** - * Gets nextBillingAt - * - * @return int - */ - public function getNextBillingAt() - { - return $this->container['nextBillingAt']; - } - - /** - * Sets nextBillingAt - * - * @param int $nextBillingAt Timestamp of next billing date - * - * @return $this - */ - public function setNextBillingAt($nextBillingAt) - { - $this->container['nextBillingAt'] = $nextBillingAt; - - return $this; - } - - /** - * Gets price - * - * @return float - */ - public function getPrice() - { - return $this->container['price']; - } - - /** - * Sets price - * - * @param float $price Plan amount - * - * @return $this - */ - public function setPrice($price) - { - $this->container['price'] = $price; - - return $this; - } - - /** - * Gets planPeriod - * - * @return string - */ - public function getPlanPeriod() - { - return $this->container['planPeriod']; - } - - /** - * Sets planPeriod - * - * @param string $planPeriod Plan period type - * - * @return $this - */ - public function setPlanPeriod($planPeriod) - { - $allowedValues = $this->getPlanPeriodAllowableValues(); - if (!is_null($planPeriod) && !in_array($planPeriod, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value for 'planPeriod', must be one of '%s'", - implode("', '", $allowedValues) - ) - ); - } - $this->container['planPeriod'] = $planPeriod; - - return $this; - } - - /** - * Gets subAccounts - * - * @return int - */ - public function getSubAccounts() - { - return $this->container['subAccounts']; - } - - /** - * Sets subAccounts - * - * @param int $subAccounts Number of sub-accounts - * - * @return $this - */ - public function setSubAccounts($subAccounts) - { - $this->container['subAccounts'] = $subAccounts; - - return $this; - } - - /** - * Gets features - * - * @return \SendinBlue\Client\Model\MasterDetailsResponsePlanInfoFeatures[] - */ - public function getFeatures() - { - return $this->container['features']; - } - - /** - * Sets features - * - * @param \SendinBlue\Client\Model\MasterDetailsResponsePlanInfoFeatures[] $features List of provided features in the plan - * - * @return $this - */ - public function setFeatures($features) - { - $this->container['features'] = $features; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/MasterDetailsResponsePlanInfoFeatures.php b/lib/Model/MasterDetailsResponsePlanInfoFeatures.php deleted file mode 100644 index 1598407b..00000000 --- a/lib/Model/MasterDetailsResponsePlanInfoFeatures.php +++ /dev/null @@ -1,421 +0,0 @@ - 'string', - 'unitValue' => 'string', - 'quantity' => 'int', - 'used' => 'int', - 'remaining' => 'int' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'name' => null, - 'unitValue' => null, - 'quantity' => 'int64', - 'used' => 'int64', - 'remaining' => 'int64' - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'name' => 'name', - 'unitValue' => 'unitValue', - 'quantity' => 'quantity', - 'used' => 'used', - 'remaining' => 'remaining' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'name' => 'setName', - 'unitValue' => 'setUnitValue', - 'quantity' => 'setQuantity', - 'used' => 'setUsed', - 'remaining' => 'setRemaining' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'name' => 'getName', - 'unitValue' => 'getUnitValue', - 'quantity' => 'getQuantity', - 'used' => 'getUsed', - 'remaining' => 'getRemaining' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - $this->container['unitValue'] = isset($data['unitValue']) ? $data['unitValue'] : null; - $this->container['quantity'] = isset($data['quantity']) ? $data['quantity'] : null; - $this->container['used'] = isset($data['used']) ? $data['used'] : null; - $this->container['remaining'] = isset($data['remaining']) ? $data['remaining'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name Name of the feature - * - * @return $this - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets unitValue - * - * @return string - */ - public function getUnitValue() - { - return $this->container['unitValue']; - } - - /** - * Sets unitValue - * - * @param string $unitValue Unit value of the feature - * - * @return $this - */ - public function setUnitValue($unitValue) - { - $this->container['unitValue'] = $unitValue; - - return $this; - } - - /** - * Gets quantity - * - * @return int - */ - public function getQuantity() - { - return $this->container['quantity']; - } - - /** - * Sets quantity - * - * @param int $quantity Quantity provided in the plan - * - * @return $this - */ - public function setQuantity($quantity) - { - $this->container['quantity'] = $quantity; - - return $this; - } - - /** - * Gets used - * - * @return int - */ - public function getUsed() - { - return $this->container['used']; - } - - /** - * Sets used - * - * @param int $used Quantity consumed by master - * - * @return $this - */ - public function setUsed($used) - { - $this->container['used'] = $used; - - return $this; - } - - /** - * Gets remaining - * - * @return int - */ - public function getRemaining() - { - return $this->container['remaining']; - } - - /** - * Sets remaining - * - * @param int $remaining Quantity remaining in the plan - * - * @return $this - */ - public function setRemaining($remaining) - { - $this->container['remaining'] = $remaining; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/ModelInterface.php b/lib/Model/ModelInterface.php index aa3c9715..e68a6f50 100644 --- a/lib/Model/ModelInterface.php +++ b/lib/Model/ModelInterface.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** diff --git a/lib/Model/Note.php b/lib/Model/Note.php deleted file mode 100644 index 07c9b843..00000000 --- a/lib/Model/Note.php +++ /dev/null @@ -1,500 +0,0 @@ - 'string', - 'text' => 'string', - 'contactIds' => 'int[]', - 'dealIds' => 'string[]', - 'authorId' => 'object', - 'createdAt' => '\DateTime', - 'updatedAt' => '\DateTime' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'id' => null, - 'text' => null, - 'contactIds' => null, - 'dealIds' => null, - 'authorId' => null, - 'createdAt' => 'date-time', - 'updatedAt' => 'date-time' - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'id' => 'id', - 'text' => 'text', - 'contactIds' => 'contactIds', - 'dealIds' => 'dealIds', - 'authorId' => 'authorId', - 'createdAt' => 'createdAt', - 'updatedAt' => 'updatedAt' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'id' => 'setId', - 'text' => 'setText', - 'contactIds' => 'setContactIds', - 'dealIds' => 'setDealIds', - 'authorId' => 'setAuthorId', - 'createdAt' => 'setCreatedAt', - 'updatedAt' => 'setUpdatedAt' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'id' => 'getId', - 'text' => 'getText', - 'contactIds' => 'getContactIds', - 'dealIds' => 'getDealIds', - 'authorId' => 'getAuthorId', - 'createdAt' => 'getCreatedAt', - 'updatedAt' => 'getUpdatedAt' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['id'] = isset($data['id']) ? $data['id'] : null; - $this->container['text'] = isset($data['text']) ? $data['text'] : null; - $this->container['contactIds'] = isset($data['contactIds']) ? $data['contactIds'] : null; - $this->container['dealIds'] = isset($data['dealIds']) ? $data['dealIds'] : null; - $this->container['authorId'] = isset($data['authorId']) ? $data['authorId'] : null; - $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; - $this->container['updatedAt'] = isset($data['updatedAt']) ? $data['updatedAt'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['text'] === null) { - $invalidProperties[] = "'text' can't be null"; - } - if ((mb_strlen($this->container['text']) > 3000)) { - $invalidProperties[] = "invalid value for 'text', the character length must be smaller than or equal to 3000."; - } - - if ((mb_strlen($this->container['text']) < 1)) { - $invalidProperties[] = "invalid value for 'text', the character length must be bigger than or equal to 1."; - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets id - * - * @return string - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string $id Unique note Id - * - * @return $this - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets text - * - * @return string - */ - public function getText() - { - return $this->container['text']; - } - - /** - * Sets text - * - * @param string $text Text content of a note - * - * @return $this - */ - public function setText($text) - { - if ((mb_strlen($text) > 3000)) { - throw new \InvalidArgumentException('invalid length for $text when calling Note., must be smaller than or equal to 3000.'); - } - if ((mb_strlen($text) < 1)) { - throw new \InvalidArgumentException('invalid length for $text when calling Note., must be bigger than or equal to 1.'); - } - - $this->container['text'] = $text; - - return $this; - } - - /** - * Gets contactIds - * - * @return int[] - */ - public function getContactIds() - { - return $this->container['contactIds']; - } - - /** - * Sets contactIds - * - * @param int[] $contactIds Contact ids linked to a note - * - * @return $this - */ - public function setContactIds($contactIds) - { - $this->container['contactIds'] = $contactIds; - - return $this; - } - - /** - * Gets dealIds - * - * @return string[] - */ - public function getDealIds() - { - return $this->container['dealIds']; - } - - /** - * Sets dealIds - * - * @param string[] $dealIds Deal ids linked to a note - * - * @return $this - */ - public function setDealIds($dealIds) - { - $this->container['dealIds'] = $dealIds; - - return $this; - } - - /** - * Gets authorId - * - * @return object - */ - public function getAuthorId() - { - return $this->container['authorId']; - } - - /** - * Sets authorId - * - * @param object $authorId Account details of user which created the note - * - * @return $this - */ - public function setAuthorId($authorId) - { - $this->container['authorId'] = $authorId; - - return $this; - } - - /** - * Gets createdAt - * - * @return \DateTime - */ - public function getCreatedAt() - { - return $this->container['createdAt']; - } - - /** - * Sets createdAt - * - * @param \DateTime $createdAt Note created date/time - * - * @return $this - */ - public function setCreatedAt($createdAt) - { - $this->container['createdAt'] = $createdAt; - - return $this; - } - - /** - * Gets updatedAt - * - * @return \DateTime - */ - public function getUpdatedAt() - { - return $this->container['updatedAt']; - } - - /** - * Sets updatedAt - * - * @param \DateTime $updatedAt Note updated date/time - * - * @return $this - */ - public function setUpdatedAt($updatedAt) - { - $this->container['updatedAt'] = $updatedAt; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/NoteData.php b/lib/Model/NoteData.php deleted file mode 100644 index 9e72134c..00000000 --- a/lib/Model/NoteData.php +++ /dev/null @@ -1,380 +0,0 @@ - 'string', - 'contactIds' => 'int[]', - 'dealIds' => 'string[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'text' => null, - 'contactIds' => null, - 'dealIds' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'text' => 'text', - 'contactIds' => 'contactIds', - 'dealIds' => 'dealIds' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'text' => 'setText', - 'contactIds' => 'setContactIds', - 'dealIds' => 'setDealIds' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'text' => 'getText', - 'contactIds' => 'getContactIds', - 'dealIds' => 'getDealIds' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['text'] = isset($data['text']) ? $data['text'] : null; - $this->container['contactIds'] = isset($data['contactIds']) ? $data['contactIds'] : null; - $this->container['dealIds'] = isset($data['dealIds']) ? $data['dealIds'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['text'] === null) { - $invalidProperties[] = "'text' can't be null"; - } - if ((mb_strlen($this->container['text']) > 3000)) { - $invalidProperties[] = "invalid value for 'text', the character length must be smaller than or equal to 3000."; - } - - if ((mb_strlen($this->container['text']) < 1)) { - $invalidProperties[] = "invalid value for 'text', the character length must be bigger than or equal to 1."; - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets text - * - * @return string - */ - public function getText() - { - return $this->container['text']; - } - - /** - * Sets text - * - * @param string $text Text content of a note - * - * @return $this - */ - public function setText($text) - { - if ((mb_strlen($text) > 3000)) { - throw new \InvalidArgumentException('invalid length for $text when calling NoteData., must be smaller than or equal to 3000.'); - } - if ((mb_strlen($text) < 1)) { - throw new \InvalidArgumentException('invalid length for $text when calling NoteData., must be bigger than or equal to 1.'); - } - - $this->container['text'] = $text; - - return $this; - } - - /** - * Gets contactIds - * - * @return int[] - */ - public function getContactIds() - { - return $this->container['contactIds']; - } - - /** - * Sets contactIds - * - * @param int[] $contactIds Contact Ids linked to a note - * - * @return $this - */ - public function setContactIds($contactIds) - { - $this->container['contactIds'] = $contactIds; - - return $this; - } - - /** - * Gets dealIds - * - * @return string[] - */ - public function getDealIds() - { - return $this->container['dealIds']; - } - - /** - * Sets dealIds - * - * @param string[] $dealIds Deal Ids linked to a note - * - * @return $this - */ - public function setDealIds($dealIds) - { - $this->container['dealIds'] = $dealIds; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/NoteId.php b/lib/Model/NoteId.php deleted file mode 100644 index 40c798a2..00000000 --- a/lib/Model/NoteId.php +++ /dev/null @@ -1,302 +0,0 @@ - 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'id' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'id' => 'id' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'id' => 'setId' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'id' => 'getId' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['id'] = isset($data['id']) ? $data['id'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets id - * - * @return string - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string $id Unique note Id - * - * @return $this - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/NoteList.php b/lib/Model/NoteList.php deleted file mode 100644 index 7522047b..00000000 --- a/lib/Model/NoteList.php +++ /dev/null @@ -1,277 +0,0 @@ -listInvalidProperties()) === 0; - } - - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/PostContactInfo.php b/lib/Model/PostContactInfo.php index 76c7146a..df95b02f 100644 --- a/lib/Model/PostContactInfo.php +++ b/lib/Model/PostContactInfo.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -237,6 +237,7 @@ public function setContacts($contacts) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -249,6 +250,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -262,6 +264,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -278,6 +281,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/PostContactInfoContacts.php b/lib/Model/PostContactInfoContacts.php index 195b7437..1c46503a 100644 --- a/lib/Model/PostContactInfoContacts.php +++ b/lib/Model/PostContactInfoContacts.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -60,7 +60,7 @@ class PostContactInfoContacts implements ModelInterface, ArrayAccess 'success' => 'string[]', 'failure' => 'string[]', 'total' => 'int', - 'processId' => 'int' + 'process_id' => 'int' ]; /** @@ -72,7 +72,7 @@ class PostContactInfoContacts implements ModelInterface, ArrayAccess 'success' => 'email', 'failure' => 'email', 'total' => 'int64', - 'processId' => 'int64' + 'process_id' => 'int64' ]; /** @@ -105,7 +105,7 @@ public static function swaggerFormats() 'success' => 'success', 'failure' => 'failure', 'total' => 'total', - 'processId' => 'processId' + 'process_id' => 'processId' ]; /** @@ -117,7 +117,7 @@ public static function swaggerFormats() 'success' => 'setSuccess', 'failure' => 'setFailure', 'total' => 'setTotal', - 'processId' => 'setProcessId' + 'process_id' => 'setProcessId' ]; /** @@ -129,7 +129,7 @@ public static function swaggerFormats() 'success' => 'getSuccess', 'failure' => 'getFailure', 'total' => 'getTotal', - 'processId' => 'getProcessId' + 'process_id' => 'getProcessId' ]; /** @@ -195,7 +195,7 @@ public function __construct(array $data = null) $this->container['success'] = isset($data['success']) ? $data['success'] : null; $this->container['failure'] = isset($data['failure']) ? $data['failure'] : null; $this->container['total'] = isset($data['total']) ? $data['total'] : null; - $this->container['processId'] = isset($data['processId']) ? $data['processId'] : null; + $this->container['process_id'] = isset($data['process_id']) ? $data['process_id'] : null; } /** @@ -295,25 +295,25 @@ public function setTotal($total) } /** - * Gets processId + * Gets process_id * * @return int */ public function getProcessId() { - return $this->container['processId']; + return $this->container['process_id']; } /** - * Sets processId + * Sets process_id * - * @param int $processId Id of the process created to remove contacts from list when user opts for \"all\" option. + * @param int $process_id Id of the process created to remove contacts from list when user opts for \"all\" option. * * @return $this */ - public function setProcessId($processId) + public function setProcessId($process_id) { - $this->container['processId'] = $processId; + $this->container['process_id'] = $process_id; return $this; } @@ -324,6 +324,7 @@ public function setProcessId($processId) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -336,6 +337,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -349,6 +351,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -365,6 +368,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/PostSendFailed.php b/lib/Model/PostSendFailed.php index 4cbfea64..ba2f1aed 100644 --- a/lib/Model/PostSendFailed.php +++ b/lib/Model/PostSendFailed.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -59,9 +59,9 @@ class PostSendFailed implements ModelInterface, ArrayAccess protected static $swaggerTypes = [ 'code' => 'int', 'message' => 'string', - 'unexistingEmails' => 'string[]', - 'withoutListEmails' => 'string[]', - 'blackListedEmails' => 'string[]' + 'unexisting_emails' => 'string[]', + 'without_list_emails' => 'string[]', + 'black_listed_emails' => 'string[]' ]; /** @@ -72,9 +72,9 @@ class PostSendFailed implements ModelInterface, ArrayAccess protected static $swaggerFormats = [ 'code' => 'int64', 'message' => null, - 'unexistingEmails' => 'email', - 'withoutListEmails' => 'email', - 'blackListedEmails' => 'email' + 'unexisting_emails' => 'email', + 'without_list_emails' => 'email', + 'black_listed_emails' => 'email' ]; /** @@ -106,9 +106,9 @@ public static function swaggerFormats() protected static $attributeMap = [ 'code' => 'code', 'message' => 'message', - 'unexistingEmails' => 'unexistingEmails', - 'withoutListEmails' => 'withoutListEmails', - 'blackListedEmails' => 'blackListedEmails' + 'unexisting_emails' => 'unexistingEmails', + 'without_list_emails' => 'withoutListEmails', + 'black_listed_emails' => 'blackListedEmails' ]; /** @@ -119,9 +119,9 @@ public static function swaggerFormats() protected static $setters = [ 'code' => 'setCode', 'message' => 'setMessage', - 'unexistingEmails' => 'setUnexistingEmails', - 'withoutListEmails' => 'setWithoutListEmails', - 'blackListedEmails' => 'setBlackListedEmails' + 'unexisting_emails' => 'setUnexistingEmails', + 'without_list_emails' => 'setWithoutListEmails', + 'black_listed_emails' => 'setBlackListedEmails' ]; /** @@ -132,9 +132,9 @@ public static function swaggerFormats() protected static $getters = [ 'code' => 'getCode', 'message' => 'getMessage', - 'unexistingEmails' => 'getUnexistingEmails', - 'withoutListEmails' => 'getWithoutListEmails', - 'blackListedEmails' => 'getBlackListedEmails' + 'unexisting_emails' => 'getUnexistingEmails', + 'without_list_emails' => 'getWithoutListEmails', + 'black_listed_emails' => 'getBlackListedEmails' ]; /** @@ -199,9 +199,9 @@ public function __construct(array $data = null) { $this->container['code'] = isset($data['code']) ? $data['code'] : null; $this->container['message'] = isset($data['message']) ? $data['message'] : null; - $this->container['unexistingEmails'] = isset($data['unexistingEmails']) ? $data['unexistingEmails'] : null; - $this->container['withoutListEmails'] = isset($data['withoutListEmails']) ? $data['withoutListEmails'] : null; - $this->container['blackListedEmails'] = isset($data['blackListedEmails']) ? $data['blackListedEmails'] : null; + $this->container['unexisting_emails'] = isset($data['unexisting_emails']) ? $data['unexisting_emails'] : null; + $this->container['without_list_emails'] = isset($data['without_list_emails']) ? $data['without_list_emails'] : null; + $this->container['black_listed_emails'] = isset($data['black_listed_emails']) ? $data['black_listed_emails'] : null; } /** @@ -283,73 +283,73 @@ public function setMessage($message) } /** - * Gets unexistingEmails + * Gets unexisting_emails * * @return string[] */ public function getUnexistingEmails() { - return $this->container['unexistingEmails']; + return $this->container['unexisting_emails']; } /** - * Sets unexistingEmails + * Sets unexisting_emails * - * @param string[] $unexistingEmails unexistingEmails + * @param string[] $unexisting_emails unexisting_emails * * @return $this */ - public function setUnexistingEmails($unexistingEmails) + public function setUnexistingEmails($unexisting_emails) { - $this->container['unexistingEmails'] = $unexistingEmails; + $this->container['unexisting_emails'] = $unexisting_emails; return $this; } /** - * Gets withoutListEmails + * Gets without_list_emails * * @return string[] */ public function getWithoutListEmails() { - return $this->container['withoutListEmails']; + return $this->container['without_list_emails']; } /** - * Sets withoutListEmails + * Sets without_list_emails * - * @param string[] $withoutListEmails withoutListEmails + * @param string[] $without_list_emails without_list_emails * * @return $this */ - public function setWithoutListEmails($withoutListEmails) + public function setWithoutListEmails($without_list_emails) { - $this->container['withoutListEmails'] = $withoutListEmails; + $this->container['without_list_emails'] = $without_list_emails; return $this; } /** - * Gets blackListedEmails + * Gets black_listed_emails * * @return string[] */ public function getBlackListedEmails() { - return $this->container['blackListedEmails']; + return $this->container['black_listed_emails']; } /** - * Sets blackListedEmails + * Sets black_listed_emails * - * @param string[] $blackListedEmails blackListedEmails + * @param string[] $black_listed_emails black_listed_emails * * @return $this */ - public function setBlackListedEmails($blackListedEmails) + public function setBlackListedEmails($black_listed_emails) { - $this->container['blackListedEmails'] = $blackListedEmails; + $this->container['black_listed_emails'] = $black_listed_emails; return $this; } @@ -360,6 +360,7 @@ public function setBlackListedEmails($blackListedEmails) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -372,6 +373,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -385,6 +387,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -401,6 +404,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/PostSendSmsTestFailed.php b/lib/Model/PostSendSmsTestFailed.php index b6bf3299..dabf5904 100644 --- a/lib/Model/PostSendSmsTestFailed.php +++ b/lib/Model/PostSendSmsTestFailed.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -59,8 +59,8 @@ class PostSendSmsTestFailed implements ModelInterface, ArrayAccess protected static $swaggerTypes = [ 'code' => 'int', 'message' => 'string', - 'unexistingSms' => 'string[]', - 'withoutListSms' => 'string[]' + 'unexisting_sms' => 'string[]', + 'without_list_sms' => 'string[]' ]; /** @@ -71,8 +71,8 @@ class PostSendSmsTestFailed implements ModelInterface, ArrayAccess protected static $swaggerFormats = [ 'code' => 'int64', 'message' => null, - 'unexistingSms' => 'email', - 'withoutListSms' => 'email' + 'unexisting_sms' => 'email', + 'without_list_sms' => 'email' ]; /** @@ -104,8 +104,8 @@ public static function swaggerFormats() protected static $attributeMap = [ 'code' => 'code', 'message' => 'message', - 'unexistingSms' => 'unexistingSms', - 'withoutListSms' => 'withoutListSms' + 'unexisting_sms' => 'unexistingSms', + 'without_list_sms' => 'withoutListSms' ]; /** @@ -116,8 +116,8 @@ public static function swaggerFormats() protected static $setters = [ 'code' => 'setCode', 'message' => 'setMessage', - 'unexistingSms' => 'setUnexistingSms', - 'withoutListSms' => 'setWithoutListSms' + 'unexisting_sms' => 'setUnexistingSms', + 'without_list_sms' => 'setWithoutListSms' ]; /** @@ -128,8 +128,8 @@ public static function swaggerFormats() protected static $getters = [ 'code' => 'getCode', 'message' => 'getMessage', - 'unexistingSms' => 'getUnexistingSms', - 'withoutListSms' => 'getWithoutListSms' + 'unexisting_sms' => 'getUnexistingSms', + 'without_list_sms' => 'getWithoutListSms' ]; /** @@ -194,8 +194,8 @@ public function __construct(array $data = null) { $this->container['code'] = isset($data['code']) ? $data['code'] : null; $this->container['message'] = isset($data['message']) ? $data['message'] : null; - $this->container['unexistingSms'] = isset($data['unexistingSms']) ? $data['unexistingSms'] : null; - $this->container['withoutListSms'] = isset($data['withoutListSms']) ? $data['withoutListSms'] : null; + $this->container['unexisting_sms'] = isset($data['unexisting_sms']) ? $data['unexisting_sms'] : null; + $this->container['without_list_sms'] = isset($data['without_list_sms']) ? $data['without_list_sms'] : null; } /** @@ -277,49 +277,49 @@ public function setMessage($message) } /** - * Gets unexistingSms + * Gets unexisting_sms * * @return string[] */ public function getUnexistingSms() { - return $this->container['unexistingSms']; + return $this->container['unexisting_sms']; } /** - * Sets unexistingSms + * Sets unexisting_sms * - * @param string[] $unexistingSms unexistingSms + * @param string[] $unexisting_sms unexisting_sms * * @return $this */ - public function setUnexistingSms($unexistingSms) + public function setUnexistingSms($unexisting_sms) { - $this->container['unexistingSms'] = $unexistingSms; + $this->container['unexisting_sms'] = $unexisting_sms; return $this; } /** - * Gets withoutListSms + * Gets without_list_sms * * @return string[] */ public function getWithoutListSms() { - return $this->container['withoutListSms']; + return $this->container['without_list_sms']; } /** - * Sets withoutListSms + * Sets without_list_sms * - * @param string[] $withoutListSms withoutListSms + * @param string[] $without_list_sms without_list_sms * * @return $this */ - public function setWithoutListSms($withoutListSms) + public function setWithoutListSms($without_list_sms) { - $this->container['withoutListSms'] = $withoutListSms; + $this->container['without_list_sms'] = $without_list_sms; return $this; } @@ -330,6 +330,7 @@ public function setWithoutListSms($withoutListSms) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -342,6 +343,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -355,6 +357,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -371,6 +374,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/RemainingCreditModel.php b/lib/Model/RemainingCreditModel.php index 7d7e7932..f9123a89 100644 --- a/lib/Model/RemainingCreditModel.php +++ b/lib/Model/RemainingCreditModel.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -270,6 +270,7 @@ public function setReseller($reseller) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -282,6 +283,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -295,6 +297,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -311,6 +314,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/RemainingCreditModelChild.php b/lib/Model/RemainingCreditModelChild.php index 443dafc2..f32c6260 100644 --- a/lib/Model/RemainingCreditModelChild.php +++ b/lib/Model/RemainingCreditModelChild.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -271,6 +271,7 @@ public function setEmail($email) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -283,6 +284,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -296,6 +298,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -312,6 +315,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/RemainingCreditModelReseller.php b/lib/Model/RemainingCreditModelReseller.php index b7af9b43..14c6813c 100644 --- a/lib/Model/RemainingCreditModelReseller.php +++ b/lib/Model/RemainingCreditModelReseller.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -270,6 +270,7 @@ public function setEmail($email) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -282,6 +283,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -295,6 +297,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -311,6 +314,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/RemoveContactFromList.php b/lib/Model/RemoveContactFromList.php index 632ae085..4d6d35ed 100644 --- a/lib/Model/RemoveContactFromList.php +++ b/lib/Model/RemoveContactFromList.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -58,7 +58,6 @@ class RemoveContactFromList implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'emails' => 'string[]', - 'ids' => 'int[]', 'all' => 'bool' ]; @@ -68,8 +67,7 @@ class RemoveContactFromList implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'emails' => null, - 'ids' => 'int64', + 'emails' => 'email', 'all' => null ]; @@ -101,7 +99,6 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'emails' => 'emails', - 'ids' => 'ids', 'all' => 'all' ]; @@ -112,7 +109,6 @@ public static function swaggerFormats() */ protected static $setters = [ 'emails' => 'setEmails', - 'ids' => 'setIds', 'all' => 'setAll' ]; @@ -123,7 +119,6 @@ public static function swaggerFormats() */ protected static $getters = [ 'emails' => 'getEmails', - 'ids' => 'getIds', 'all' => 'getAll' ]; @@ -188,7 +183,6 @@ public function getModelName() public function __construct(array $data = null) { $this->container['emails'] = isset($data['emails']) ? $data['emails'] : null; - $this->container['ids'] = isset($data['ids']) ? $data['ids'] : null; $this->container['all'] = isset($data['all']) ? $data['all'] : null; } @@ -240,30 +234,6 @@ public function setEmails($emails) return $this; } - /** - * Gets ids - * - * @return int[] - */ - public function getIds() - { - return $this->container['ids']; - } - - /** - * Sets ids - * - * @param int[] $ids Mandatory if Emails are not passed, ignored otherwise. Emails to add to a list. You can pass a maximum of 150 emails for addition in one request. If you need to add the emails in bulk, please prefer /contacts/import api. - * - * @return $this - */ - public function setIds($ids) - { - $this->container['ids'] = $ids; - - return $this; - } - /** * Gets all * @@ -277,7 +247,7 @@ public function getAll() /** * Sets all * - * @param bool $all Required if none of 'emails' or 'ids' are passed. Remove all existing contacts from a list. A process will be created in this scenario. You can fetch the process details to know about the progress + * @param bool $all Required if 'emails' is empty. Remove all existing contacts from a list. A process will be created in this scenario. You can fetch the process details to know about the progress * * @return $this */ @@ -294,6 +264,7 @@ public function setAll($all) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -306,6 +277,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -319,6 +291,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -335,6 +308,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/RemoveCredits.php b/lib/Model/RemoveCredits.php index 65e5637d..ec4c2e90 100644 --- a/lib/Model/RemoveCredits.php +++ b/lib/Model/RemoveCredits.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -264,6 +264,7 @@ public function setEmail($email) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -276,6 +277,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -289,6 +291,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -305,6 +308,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/RequestContactExport.php b/lib/Model/RequestContactExport.php index 47da9220..1e6c8b51 100644 --- a/lib/Model/RequestContactExport.php +++ b/lib/Model/RequestContactExport.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -57,9 +57,10 @@ class RequestContactExport implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'exportAttributes' => 'string[]', - 'customContactFilter' => '\SendinBlue\Client\Model\RequestContactExportCustomContactFilter', - 'notifyUrl' => 'string' + 'export_attributes' => 'string[]', + 'contact_filter' => 'object', + 'custom_contact_filter' => '\SendinBlue\Client\Model\RequestContactExportCustomContactFilter', + 'notify_url' => 'string' ]; /** @@ -68,9 +69,10 @@ class RequestContactExport implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'exportAttributes' => null, - 'customContactFilter' => null, - 'notifyUrl' => 'url' + 'export_attributes' => null, + 'contact_filter' => null, + 'custom_contact_filter' => null, + 'notify_url' => 'url' ]; /** @@ -100,9 +102,10 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'exportAttributes' => 'exportAttributes', - 'customContactFilter' => 'customContactFilter', - 'notifyUrl' => 'notifyUrl' + 'export_attributes' => 'exportAttributes', + 'contact_filter' => 'contactFilter', + 'custom_contact_filter' => 'customContactFilter', + 'notify_url' => 'notifyUrl' ]; /** @@ -111,9 +114,10 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'exportAttributes' => 'setExportAttributes', - 'customContactFilter' => 'setCustomContactFilter', - 'notifyUrl' => 'setNotifyUrl' + 'export_attributes' => 'setExportAttributes', + 'contact_filter' => 'setContactFilter', + 'custom_contact_filter' => 'setCustomContactFilter', + 'notify_url' => 'setNotifyUrl' ]; /** @@ -122,9 +126,10 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'exportAttributes' => 'getExportAttributes', - 'customContactFilter' => 'getCustomContactFilter', - 'notifyUrl' => 'getNotifyUrl' + 'export_attributes' => 'getExportAttributes', + 'contact_filter' => 'getContactFilter', + 'custom_contact_filter' => 'getCustomContactFilter', + 'notify_url' => 'getNotifyUrl' ]; /** @@ -187,9 +192,10 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['exportAttributes'] = isset($data['exportAttributes']) ? $data['exportAttributes'] : null; - $this->container['customContactFilter'] = isset($data['customContactFilter']) ? $data['customContactFilter'] : null; - $this->container['notifyUrl'] = isset($data['notifyUrl']) ? $data['notifyUrl'] : null; + $this->container['export_attributes'] = isset($data['export_attributes']) ? $data['export_attributes'] : null; + $this->container['contact_filter'] = isset($data['contact_filter']) ? $data['contact_filter'] : null; + $this->container['custom_contact_filter'] = isset($data['custom_contact_filter']) ? $data['custom_contact_filter'] : null; + $this->container['notify_url'] = isset($data['notify_url']) ? $data['notify_url'] : null; } /** @@ -201,9 +207,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['customContactFilter'] === null) { - $invalidProperties[] = "'customContactFilter' can't be null"; - } return $invalidProperties; } @@ -220,73 +223,97 @@ public function valid() /** - * Gets exportAttributes + * Gets export_attributes * * @return string[] */ public function getExportAttributes() { - return $this->container['exportAttributes']; + return $this->container['export_attributes']; + } + + /** + * Sets export_attributes + * + * @param string[] $export_attributes List of all the attributes that you want to export. These attributes must be present in your contact database. For example, ['fname', 'lname', 'email']. + * + * @return $this + */ + public function setExportAttributes($export_attributes) + { + $this->container['export_attributes'] = $export_attributes; + + return $this; + } + + /** + * Gets contact_filter + * + * @return object + */ + public function getContactFilter() + { + return $this->container['contact_filter']; } /** - * Sets exportAttributes + * Sets contact_filter * - * @param string[] $exportAttributes List of all the attributes that you want to export. These attributes must be present in your contact database. For example, ['fname', 'lname', 'email']. + * @param object $contact_filter This attribute has been deprecated and will be removed by January 1st, 2021. Only one of the two filter options (contactFilter or customContactFilter) can be passed in the request. Set the filter for the contacts to be exported. For example, {\"blacklisted\":true} will export all the blacklisted contacts. * * @return $this */ - public function setExportAttributes($exportAttributes) + public function setContactFilter($contact_filter) { - $this->container['exportAttributes'] = $exportAttributes; + $this->container['contact_filter'] = $contact_filter; return $this; } /** - * Gets customContactFilter + * Gets custom_contact_filter * * @return \SendinBlue\Client\Model\RequestContactExportCustomContactFilter */ public function getCustomContactFilter() { - return $this->container['customContactFilter']; + return $this->container['custom_contact_filter']; } /** - * Sets customContactFilter + * Sets custom_contact_filter * - * @param \SendinBlue\Client\Model\RequestContactExportCustomContactFilter $customContactFilter customContactFilter + * @param \SendinBlue\Client\Model\RequestContactExportCustomContactFilter $custom_contact_filter custom_contact_filter * * @return $this */ - public function setCustomContactFilter($customContactFilter) + public function setCustomContactFilter($custom_contact_filter) { - $this->container['customContactFilter'] = $customContactFilter; + $this->container['custom_contact_filter'] = $custom_contact_filter; return $this; } /** - * Gets notifyUrl + * Gets notify_url * * @return string */ public function getNotifyUrl() { - return $this->container['notifyUrl']; + return $this->container['notify_url']; } /** - * Sets notifyUrl + * Sets notify_url * - * @param string $notifyUrl Webhook that will be called once the export process is finished. For reference, https://help.sendinblue.com/hc/en-us/articles/360007666479 + * @param string $notify_url Webhook that will be called once the export process is finished. For reference, https://help.sendinblue.com/hc/en-us/articles/360007666479 * * @return $this */ - public function setNotifyUrl($notifyUrl) + public function setNotifyUrl($notify_url) { - $this->container['notifyUrl'] = $notifyUrl; + $this->container['notify_url'] = $notify_url; return $this; } @@ -297,6 +324,7 @@ public function setNotifyUrl($notifyUrl) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -309,6 +337,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -322,6 +351,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -338,6 +368,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/RequestContactExportCustomContactFilter.php b/lib/Model/RequestContactExportCustomContactFilter.php index 1a8a9f8d..ff3a339e 100644 --- a/lib/Model/RequestContactExportCustomContactFilter.php +++ b/lib/Model/RequestContactExportCustomContactFilter.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -36,7 +36,7 @@ * RequestContactExportCustomContactFilter Class Doc Comment * * @category Class - * @description Set the filter for the contacts to be exported. + * @description Only one of the two filter options (contactFilter or customContactFilter) can be passed in the request. Set the filter for the contacts to be exported. * @package SendinBlue\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen @@ -58,12 +58,12 @@ class RequestContactExportCustomContactFilter implements ModelInterface, ArrayAc * @var string[] */ protected static $swaggerTypes = [ - 'actionForContacts' => 'string', - 'actionForEmailCampaigns' => 'string', - 'actionForSmsCampaigns' => 'string', - 'listId' => 'int', - 'emailCampaignId' => 'int', - 'smsCampaignId' => 'int' + 'action_for_contacts' => 'string', + 'action_for_email_campaigns' => 'string', + 'action_for_sms_campaigns' => 'string', + 'list_id' => 'int', + 'email_campaign_id' => 'int', + 'sms_campaign_id' => 'int' ]; /** @@ -72,12 +72,12 @@ class RequestContactExportCustomContactFilter implements ModelInterface, ArrayAc * @var string[] */ protected static $swaggerFormats = [ - 'actionForContacts' => null, - 'actionForEmailCampaigns' => null, - 'actionForSmsCampaigns' => null, - 'listId' => 'int64', - 'emailCampaignId' => 'int64', - 'smsCampaignId' => 'int64' + 'action_for_contacts' => null, + 'action_for_email_campaigns' => null, + 'action_for_sms_campaigns' => null, + 'list_id' => 'int64', + 'email_campaign_id' => 'int64', + 'sms_campaign_id' => 'int64' ]; /** @@ -107,12 +107,12 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'actionForContacts' => 'actionForContacts', - 'actionForEmailCampaigns' => 'actionForEmailCampaigns', - 'actionForSmsCampaigns' => 'actionForSmsCampaigns', - 'listId' => 'listId', - 'emailCampaignId' => 'emailCampaignId', - 'smsCampaignId' => 'smsCampaignId' + 'action_for_contacts' => 'actionForContacts', + 'action_for_email_campaigns' => 'actionForEmailCampaigns', + 'action_for_sms_campaigns' => 'actionForSmsCampaigns', + 'list_id' => 'listId', + 'email_campaign_id' => 'emailCampaignId', + 'sms_campaign_id' => 'smsCampaignId' ]; /** @@ -121,12 +121,12 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'actionForContacts' => 'setActionForContacts', - 'actionForEmailCampaigns' => 'setActionForEmailCampaigns', - 'actionForSmsCampaigns' => 'setActionForSmsCampaigns', - 'listId' => 'setListId', - 'emailCampaignId' => 'setEmailCampaignId', - 'smsCampaignId' => 'setSmsCampaignId' + 'action_for_contacts' => 'setActionForContacts', + 'action_for_email_campaigns' => 'setActionForEmailCampaigns', + 'action_for_sms_campaigns' => 'setActionForSmsCampaigns', + 'list_id' => 'setListId', + 'email_campaign_id' => 'setEmailCampaignId', + 'sms_campaign_id' => 'setSmsCampaignId' ]; /** @@ -135,12 +135,12 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'actionForContacts' => 'getActionForContacts', - 'actionForEmailCampaigns' => 'getActionForEmailCampaigns', - 'actionForSmsCampaigns' => 'getActionForSmsCampaigns', - 'listId' => 'getListId', - 'emailCampaignId' => 'getEmailCampaignId', - 'smsCampaignId' => 'getSmsCampaignId' + 'action_for_contacts' => 'getActionForContacts', + 'action_for_email_campaigns' => 'getActionForEmailCampaigns', + 'action_for_sms_campaigns' => 'getActionForSmsCampaigns', + 'list_id' => 'getListId', + 'email_campaign_id' => 'getEmailCampaignId', + 'sms_campaign_id' => 'getSmsCampaignId' ]; /** @@ -264,12 +264,12 @@ public function getActionForSmsCampaignsAllowableValues() */ public function __construct(array $data = null) { - $this->container['actionForContacts'] = isset($data['actionForContacts']) ? $data['actionForContacts'] : null; - $this->container['actionForEmailCampaigns'] = isset($data['actionForEmailCampaigns']) ? $data['actionForEmailCampaigns'] : null; - $this->container['actionForSmsCampaigns'] = isset($data['actionForSmsCampaigns']) ? $data['actionForSmsCampaigns'] : null; - $this->container['listId'] = isset($data['listId']) ? $data['listId'] : null; - $this->container['emailCampaignId'] = isset($data['emailCampaignId']) ? $data['emailCampaignId'] : null; - $this->container['smsCampaignId'] = isset($data['smsCampaignId']) ? $data['smsCampaignId'] : null; + $this->container['action_for_contacts'] = isset($data['action_for_contacts']) ? $data['action_for_contacts'] : null; + $this->container['action_for_email_campaigns'] = isset($data['action_for_email_campaigns']) ? $data['action_for_email_campaigns'] : null; + $this->container['action_for_sms_campaigns'] = isset($data['action_for_sms_campaigns']) ? $data['action_for_sms_campaigns'] : null; + $this->container['list_id'] = isset($data['list_id']) ? $data['list_id'] : null; + $this->container['email_campaign_id'] = isset($data['email_campaign_id']) ? $data['email_campaign_id'] : null; + $this->container['sms_campaign_id'] = isset($data['sms_campaign_id']) ? $data['sms_campaign_id'] : null; } /** @@ -282,25 +282,25 @@ public function listInvalidProperties() $invalidProperties = []; $allowedValues = $this->getActionForContactsAllowableValues(); - if (!is_null($this->container['actionForContacts']) && !in_array($this->container['actionForContacts'], $allowedValues, true)) { + if (!is_null($this->container['action_for_contacts']) && !in_array($this->container['action_for_contacts'], $allowedValues, true)) { $invalidProperties[] = sprintf( - "invalid value for 'actionForContacts', must be one of '%s'", + "invalid value for 'action_for_contacts', must be one of '%s'", implode("', '", $allowedValues) ); } $allowedValues = $this->getActionForEmailCampaignsAllowableValues(); - if (!is_null($this->container['actionForEmailCampaigns']) && !in_array($this->container['actionForEmailCampaigns'], $allowedValues, true)) { + if (!is_null($this->container['action_for_email_campaigns']) && !in_array($this->container['action_for_email_campaigns'], $allowedValues, true)) { $invalidProperties[] = sprintf( - "invalid value for 'actionForEmailCampaigns', must be one of '%s'", + "invalid value for 'action_for_email_campaigns', must be one of '%s'", implode("', '", $allowedValues) ); } $allowedValues = $this->getActionForSmsCampaignsAllowableValues(); - if (!is_null($this->container['actionForSmsCampaigns']) && !in_array($this->container['actionForSmsCampaigns'], $allowedValues, true)) { + if (!is_null($this->container['action_for_sms_campaigns']) && !in_array($this->container['action_for_sms_campaigns'], $allowedValues, true)) { $invalidProperties[] = sprintf( - "invalid value for 'actionForSmsCampaigns', must be one of '%s'", + "invalid value for 'action_for_sms_campaigns', must be one of '%s'", implode("', '", $allowedValues) ); } @@ -321,172 +321,172 @@ public function valid() /** - * Gets actionForContacts + * Gets action_for_contacts * * @return string */ public function getActionForContacts() { - return $this->container['actionForContacts']; + return $this->container['action_for_contacts']; } /** - * Sets actionForContacts + * Sets action_for_contacts * - * @param string $actionForContacts Mandatory if neither actionForEmailCampaigns nor actionForSmsCampaigns is passed. This will export the contacts on the basis of provided action applied on contacts as per the list id. * allContacts - Fetch the list of all contacts for a particular list. * subscribed & unsubscribed - Fetch the list of subscribed / unsubscribed (blacklisted via any means) contacts for a particular list. * unsubscribedPerList - Fetch the list of contacts that are unsubscribed from a particular list only. + * @param string $action_for_contacts Mandatory if neither actionForEmailCampaigns nor actionForSmsCampaigns is passed. This will export the contacts on the basis of provided action applied on contacts as per the list id. * allContacts - Fetch the list of all contacts for a particular list. * subscribed & unsubscribed - Fetch the list of subscribed / unsubscribed (blacklisted via any means) contacts for a particular list. * unsubscribedPerList - Fetch the list of contacts that are unsubscribed from a particular list only. * * @return $this */ - public function setActionForContacts($actionForContacts) + public function setActionForContacts($action_for_contacts) { $allowedValues = $this->getActionForContactsAllowableValues(); - if (!is_null($actionForContacts) && !in_array($actionForContacts, $allowedValues, true)) { + if (!is_null($action_for_contacts) && !in_array($action_for_contacts, $allowedValues, true)) { throw new \InvalidArgumentException( sprintf( - "Invalid value for 'actionForContacts', must be one of '%s'", + "Invalid value for 'action_for_contacts', must be one of '%s'", implode("', '", $allowedValues) ) ); } - $this->container['actionForContacts'] = $actionForContacts; + $this->container['action_for_contacts'] = $action_for_contacts; return $this; } /** - * Gets actionForEmailCampaigns + * Gets action_for_email_campaigns * * @return string */ public function getActionForEmailCampaigns() { - return $this->container['actionForEmailCampaigns']; + return $this->container['action_for_email_campaigns']; } /** - * Sets actionForEmailCampaigns + * Sets action_for_email_campaigns * - * @param string $actionForEmailCampaigns Mandatory if neither actionForContacts nor actionForSmsCampaigns is passed. This will export the contacts on the basis of provided action applied on email campaigns. * openers & nonOpeners - emailCampaignId is mandatory. Fetch the list of readers / non-readers for a particular email campaign. * clickers & nonClickers - emailCampaignId is mandatory. Fetch the list of clickers / non-clickers for a particular email campaign. * unsubscribed - emailCampaignId is mandatory. Fetch the list of all unsubscribed (blacklisted via any means) contacts for a particular email campaign. * hardBounces & softBounces - emailCampaignId is optional. Fetch the list of hard bounces / soft bounces for a particular / all email campaign(s). + * @param string $action_for_email_campaigns Mandatory if neither actionForContacts nor actionForSmsCampaigns is passed. This will export the contacts on the basis of provided action applied on email campaigns. * openers & nonOpeners - emailCampaignId is mandatory. Fetch the list of readers / non-readers for a particular email campaign. * clickers & nonClickers - emailCampaignId is mandatory. Fetch the list of clickers / non-clickers for a particular email campaign. * unsubscribed - emailCampaignId is mandatory. Fetch the list of all unsubscribed (blacklisted via any means) contacts for a particular email campaign. * hardBounces & softBounces - emailCampaignId is optional. Fetch the list of hard bounces / soft bounces for a particular / all email campaign(s). * * @return $this */ - public function setActionForEmailCampaigns($actionForEmailCampaigns) + public function setActionForEmailCampaigns($action_for_email_campaigns) { $allowedValues = $this->getActionForEmailCampaignsAllowableValues(); - if (!is_null($actionForEmailCampaigns) && !in_array($actionForEmailCampaigns, $allowedValues, true)) { + if (!is_null($action_for_email_campaigns) && !in_array($action_for_email_campaigns, $allowedValues, true)) { throw new \InvalidArgumentException( sprintf( - "Invalid value for 'actionForEmailCampaigns', must be one of '%s'", + "Invalid value for 'action_for_email_campaigns', must be one of '%s'", implode("', '", $allowedValues) ) ); } - $this->container['actionForEmailCampaigns'] = $actionForEmailCampaigns; + $this->container['action_for_email_campaigns'] = $action_for_email_campaigns; return $this; } /** - * Gets actionForSmsCampaigns + * Gets action_for_sms_campaigns * * @return string */ public function getActionForSmsCampaigns() { - return $this->container['actionForSmsCampaigns']; + return $this->container['action_for_sms_campaigns']; } /** - * Sets actionForSmsCampaigns + * Sets action_for_sms_campaigns * - * @param string $actionForSmsCampaigns Mandatory if neither actionForContacts nor actionForEmailCampaigns is passed. This will export the contacts on the basis of provided action applied on sms campaigns. * unsubscribed - Fetch the list of all unsubscribed (blacklisted via any means) contacts for all / particular sms campaigns. * hardBounces & softBounces - Fetch the list of hard bounces / soft bounces for all / particular sms campaigns. + * @param string $action_for_sms_campaigns Mandatory if neither actionForContacts nor actionForEmailCampaigns is passed. This will export the contacts on the basis of provided action applied on sms campaigns. * unsubscribed - Fetch the list of all unsubscribed (blacklisted via any means) contacts for all / particular sms campaigns. * hardBounces & softBounces - Fetch the list of hard bounces / soft bounces for all / particular sms campaigns. * * @return $this */ - public function setActionForSmsCampaigns($actionForSmsCampaigns) + public function setActionForSmsCampaigns($action_for_sms_campaigns) { $allowedValues = $this->getActionForSmsCampaignsAllowableValues(); - if (!is_null($actionForSmsCampaigns) && !in_array($actionForSmsCampaigns, $allowedValues, true)) { + if (!is_null($action_for_sms_campaigns) && !in_array($action_for_sms_campaigns, $allowedValues, true)) { throw new \InvalidArgumentException( sprintf( - "Invalid value for 'actionForSmsCampaigns', must be one of '%s'", + "Invalid value for 'action_for_sms_campaigns', must be one of '%s'", implode("', '", $allowedValues) ) ); } - $this->container['actionForSmsCampaigns'] = $actionForSmsCampaigns; + $this->container['action_for_sms_campaigns'] = $action_for_sms_campaigns; return $this; } /** - * Gets listId + * Gets list_id * * @return int */ public function getListId() { - return $this->container['listId']; + return $this->container['list_id']; } /** - * Sets listId + * Sets list_id * - * @param int $listId Mandatory if actionForContacts is passed, ignored otherwise. Id of the list for which the corresponding action shall be applied in the filter. + * @param int $list_id Mandatory if actionForContacts is passed, ignored otherwise. Id of the list for which the corresponding action shall be applied in the filter. * * @return $this */ - public function setListId($listId) + public function setListId($list_id) { - $this->container['listId'] = $listId; + $this->container['list_id'] = $list_id; return $this; } /** - * Gets emailCampaignId + * Gets email_campaign_id * * @return int */ public function getEmailCampaignId() { - return $this->container['emailCampaignId']; + return $this->container['email_campaign_id']; } /** - * Sets emailCampaignId + * Sets email_campaign_id * - * @param int $emailCampaignId Considered only if actionForEmailCampaigns is passed, ignored otherwise. Mandatory if action is one of the following - openers, nonOpeners, clickers, nonClickers, unsubscribed. The id of the email campaign for which the corresponding action shall be applied in the filter. + * @param int $email_campaign_id Considered only if actionForEmailCampaigns is passed, ignored otherwise. Mandatory if action is one of the following - openers, nonOpeners, clickers, nonClickers, unsubscribed. The id of the email campaign for which the corresponding action shall be applied in the filter. * * @return $this */ - public function setEmailCampaignId($emailCampaignId) + public function setEmailCampaignId($email_campaign_id) { - $this->container['emailCampaignId'] = $emailCampaignId; + $this->container['email_campaign_id'] = $email_campaign_id; return $this; } /** - * Gets smsCampaignId + * Gets sms_campaign_id * * @return int */ public function getSmsCampaignId() { - return $this->container['smsCampaignId']; + return $this->container['sms_campaign_id']; } /** - * Sets smsCampaignId + * Sets sms_campaign_id * - * @param int $smsCampaignId Considered only if actionForSmsCampaigns is passed, ignored otherwise. The id of sms campaign for which the corresponding action shall be applied in the filter. + * @param int $sms_campaign_id Considered only if actionForSmsCampaigns is passed, ignored otherwise. The id of sms campaign for which the corresponding action shall be applied in the filter. * * @return $this */ - public function setSmsCampaignId($smsCampaignId) + public function setSmsCampaignId($sms_campaign_id) { - $this->container['smsCampaignId'] = $smsCampaignId; + $this->container['sms_campaign_id'] = $sms_campaign_id; return $this; } @@ -497,6 +497,7 @@ public function setSmsCampaignId($smsCampaignId) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -509,6 +510,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -522,6 +524,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -538,6 +541,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/RequestContactImport.php b/lib/Model/RequestContactImport.php index ef9e696f..d13d387b 100644 --- a/lib/Model/RequestContactImport.php +++ b/lib/Model/RequestContactImport.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -57,16 +57,15 @@ class RequestContactImport implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'fileUrl' => 'string', - 'fileBody' => 'string', - 'jsonBody' => 'map[string,object][]', - 'listIds' => 'int[]', - 'notifyUrl' => 'string', - 'newList' => '\SendinBlue\Client\Model\RequestContactImportNewList', - 'emailBlacklist' => 'bool', - 'smsBlacklist' => 'bool', - 'updateExistingContacts' => 'bool', - 'emptyContactsAttributes' => 'bool' + 'file_url' => 'string', + 'file_body' => 'string', + 'list_ids' => 'int[]', + 'notify_url' => 'string', + 'new_list' => '\SendinBlue\Client\Model\RequestContactImportNewList', + 'email_blacklist' => 'bool', + 'sms_blacklist' => 'bool', + 'update_existing_contacts' => 'bool', + 'empty_contacts_attributes' => 'bool' ]; /** @@ -75,16 +74,15 @@ class RequestContactImport implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'fileUrl' => 'url', - 'fileBody' => null, - 'jsonBody' => null, - 'listIds' => 'int64', - 'notifyUrl' => 'url', - 'newList' => null, - 'emailBlacklist' => null, - 'smsBlacklist' => null, - 'updateExistingContacts' => null, - 'emptyContactsAttributes' => null + 'file_url' => 'url', + 'file_body' => null, + 'list_ids' => 'int64', + 'notify_url' => 'url', + 'new_list' => null, + 'email_blacklist' => null, + 'sms_blacklist' => null, + 'update_existing_contacts' => null, + 'empty_contacts_attributes' => null ]; /** @@ -114,16 +112,15 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'fileUrl' => 'fileUrl', - 'fileBody' => 'fileBody', - 'jsonBody' => 'jsonBody', - 'listIds' => 'listIds', - 'notifyUrl' => 'notifyUrl', - 'newList' => 'newList', - 'emailBlacklist' => 'emailBlacklist', - 'smsBlacklist' => 'smsBlacklist', - 'updateExistingContacts' => 'updateExistingContacts', - 'emptyContactsAttributes' => 'emptyContactsAttributes' + 'file_url' => 'fileUrl', + 'file_body' => 'fileBody', + 'list_ids' => 'listIds', + 'notify_url' => 'notifyUrl', + 'new_list' => 'newList', + 'email_blacklist' => 'emailBlacklist', + 'sms_blacklist' => 'smsBlacklist', + 'update_existing_contacts' => 'updateExistingContacts', + 'empty_contacts_attributes' => 'emptyContactsAttributes' ]; /** @@ -132,16 +129,15 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'fileUrl' => 'setFileUrl', - 'fileBody' => 'setFileBody', - 'jsonBody' => 'setJsonBody', - 'listIds' => 'setListIds', - 'notifyUrl' => 'setNotifyUrl', - 'newList' => 'setNewList', - 'emailBlacklist' => 'setEmailBlacklist', - 'smsBlacklist' => 'setSmsBlacklist', - 'updateExistingContacts' => 'setUpdateExistingContacts', - 'emptyContactsAttributes' => 'setEmptyContactsAttributes' + 'file_url' => 'setFileUrl', + 'file_body' => 'setFileBody', + 'list_ids' => 'setListIds', + 'notify_url' => 'setNotifyUrl', + 'new_list' => 'setNewList', + 'email_blacklist' => 'setEmailBlacklist', + 'sms_blacklist' => 'setSmsBlacklist', + 'update_existing_contacts' => 'setUpdateExistingContacts', + 'empty_contacts_attributes' => 'setEmptyContactsAttributes' ]; /** @@ -150,16 +146,15 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'fileUrl' => 'getFileUrl', - 'fileBody' => 'getFileBody', - 'jsonBody' => 'getJsonBody', - 'listIds' => 'getListIds', - 'notifyUrl' => 'getNotifyUrl', - 'newList' => 'getNewList', - 'emailBlacklist' => 'getEmailBlacklist', - 'smsBlacklist' => 'getSmsBlacklist', - 'updateExistingContacts' => 'getUpdateExistingContacts', - 'emptyContactsAttributes' => 'getEmptyContactsAttributes' + 'file_url' => 'getFileUrl', + 'file_body' => 'getFileBody', + 'list_ids' => 'getListIds', + 'notify_url' => 'getNotifyUrl', + 'new_list' => 'getNewList', + 'email_blacklist' => 'getEmailBlacklist', + 'sms_blacklist' => 'getSmsBlacklist', + 'update_existing_contacts' => 'getUpdateExistingContacts', + 'empty_contacts_attributes' => 'getEmptyContactsAttributes' ]; /** @@ -222,16 +217,15 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['fileUrl'] = isset($data['fileUrl']) ? $data['fileUrl'] : null; - $this->container['fileBody'] = isset($data['fileBody']) ? $data['fileBody'] : null; - $this->container['jsonBody'] = isset($data['jsonBody']) ? $data['jsonBody'] : null; - $this->container['listIds'] = isset($data['listIds']) ? $data['listIds'] : null; - $this->container['notifyUrl'] = isset($data['notifyUrl']) ? $data['notifyUrl'] : null; - $this->container['newList'] = isset($data['newList']) ? $data['newList'] : null; - $this->container['emailBlacklist'] = isset($data['emailBlacklist']) ? $data['emailBlacklist'] : false; - $this->container['smsBlacklist'] = isset($data['smsBlacklist']) ? $data['smsBlacklist'] : false; - $this->container['updateExistingContacts'] = isset($data['updateExistingContacts']) ? $data['updateExistingContacts'] : true; - $this->container['emptyContactsAttributes'] = isset($data['emptyContactsAttributes']) ? $data['emptyContactsAttributes'] : false; + $this->container['file_url'] = isset($data['file_url']) ? $data['file_url'] : null; + $this->container['file_body'] = isset($data['file_body']) ? $data['file_body'] : null; + $this->container['list_ids'] = isset($data['list_ids']) ? $data['list_ids'] : null; + $this->container['notify_url'] = isset($data['notify_url']) ? $data['notify_url'] : null; + $this->container['new_list'] = isset($data['new_list']) ? $data['new_list'] : null; + $this->container['email_blacklist'] = isset($data['email_blacklist']) ? $data['email_blacklist'] : false; + $this->container['sms_blacklist'] = isset($data['sms_blacklist']) ? $data['sms_blacklist'] : false; + $this->container['update_existing_contacts'] = isset($data['update_existing_contacts']) ? $data['update_existing_contacts'] : true; + $this->container['empty_contacts_attributes'] = isset($data['empty_contacts_attributes']) ? $data['empty_contacts_attributes'] : false; } /** @@ -259,241 +253,217 @@ public function valid() /** - * Gets fileUrl + * Gets file_url * * @return string */ public function getFileUrl() { - return $this->container['fileUrl']; + return $this->container['file_url']; } /** - * Sets fileUrl + * Sets file_url * - * @param string $fileUrl Mandatory if fileBody or jsonBody is not defined. URL of the file to be imported (no local file). Possible file formats: .txt, .csv, .json + * @param string $file_url Mandatory if fileBody is not defined. URL of the file to be imported (no local file). Possible file formats: .txt, .csv * * @return $this */ - public function setFileUrl($fileUrl) + public function setFileUrl($file_url) { - $this->container['fileUrl'] = $fileUrl; + $this->container['file_url'] = $file_url; return $this; } /** - * Gets fileBody + * Gets file_body * * @return string */ public function getFileBody() { - return $this->container['fileBody']; + return $this->container['file_body']; } /** - * Sets fileBody + * Sets file_body * - * @param string $fileBody Mandatory if fileUrl and jsonBody is not defined. CSV content to be imported. Use semicolon to separate multiple attributes. Maximum allowed file body size is 10MB . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of file body size while parsing. Please use fileUrl instead to import bigger files. + * @param string $file_body Mandatory if fileUrl is not defined. CSV content to be imported. Use semicolon to separate multiple attributes. Maximum allowed file body size is 10MB . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of file body size while parsing. Please use fileUrl instead to import bigger files. * * @return $this */ - public function setFileBody($fileBody) + public function setFileBody($file_body) { - $this->container['fileBody'] = $fileBody; + $this->container['file_body'] = $file_body; return $this; } /** - * Gets jsonBody - * - * @return map[string,object][] - */ - public function getJsonBody() - { - return $this->container['jsonBody']; - } - - /** - * Sets jsonBody - * - * @param map[string,object][] $jsonBody **Mandatory if fileUrl and fileBody is not defined.** JSON content to be imported. **Maximum allowed json body size is 10MB** . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of json body size while parsing. Please use fileUrl instead to import bigger files. - * - * @return $this - */ - public function setJsonBody($jsonBody) - { - $this->container['jsonBody'] = $jsonBody; - - return $this; - } - - /** - * Gets listIds + * Gets list_ids * * @return int[] */ public function getListIds() { - return $this->container['listIds']; + return $this->container['list_ids']; } /** - * Sets listIds + * Sets list_ids * - * @param int[] $listIds Mandatory if newList is not defined. Ids of the lists in which the contacts shall be imported. For example, [2, 4, 7]. + * @param int[] $list_ids Mandatory if newList is not defined. Ids of the lists in which the contacts shall be imported. For example, [2, 4, 7]. * * @return $this */ - public function setListIds($listIds) + public function setListIds($list_ids) { - $this->container['listIds'] = $listIds; + $this->container['list_ids'] = $list_ids; return $this; } /** - * Gets notifyUrl + * Gets notify_url * * @return string */ public function getNotifyUrl() { - return $this->container['notifyUrl']; + return $this->container['notify_url']; } /** - * Sets notifyUrl + * Sets notify_url * - * @param string $notifyUrl URL that will be called once the import process is finished. For reference, https://help.sendinblue.com/hc/en-us/articles/360007666479 + * @param string $notify_url URL that will be called once the import process is finished. For reference, https://help.sendinblue.com/hc/en-us/articles/360007666479 * * @return $this */ - public function setNotifyUrl($notifyUrl) + public function setNotifyUrl($notify_url) { - $this->container['notifyUrl'] = $notifyUrl; + $this->container['notify_url'] = $notify_url; return $this; } /** - * Gets newList + * Gets new_list * * @return \SendinBlue\Client\Model\RequestContactImportNewList */ public function getNewList() { - return $this->container['newList']; + return $this->container['new_list']; } /** - * Sets newList + * Sets new_list * - * @param \SendinBlue\Client\Model\RequestContactImportNewList $newList newList + * @param \SendinBlue\Client\Model\RequestContactImportNewList $new_list new_list * * @return $this */ - public function setNewList($newList) + public function setNewList($new_list) { - $this->container['newList'] = $newList; + $this->container['new_list'] = $new_list; return $this; } /** - * Gets emailBlacklist + * Gets email_blacklist * * @return bool */ public function getEmailBlacklist() { - return $this->container['emailBlacklist']; + return $this->container['email_blacklist']; } /** - * Sets emailBlacklist + * Sets email_blacklist * - * @param bool $emailBlacklist To blacklist all the contacts for email + * @param bool $email_blacklist To blacklist all the contacts for email * * @return $this */ - public function setEmailBlacklist($emailBlacklist) + public function setEmailBlacklist($email_blacklist) { - $this->container['emailBlacklist'] = $emailBlacklist; + $this->container['email_blacklist'] = $email_blacklist; return $this; } /** - * Gets smsBlacklist + * Gets sms_blacklist * * @return bool */ public function getSmsBlacklist() { - return $this->container['smsBlacklist']; + return $this->container['sms_blacklist']; } /** - * Sets smsBlacklist + * Sets sms_blacklist * - * @param bool $smsBlacklist To blacklist all the contacts for sms + * @param bool $sms_blacklist To blacklist all the contacts for sms * * @return $this */ - public function setSmsBlacklist($smsBlacklist) + public function setSmsBlacklist($sms_blacklist) { - $this->container['smsBlacklist'] = $smsBlacklist; + $this->container['sms_blacklist'] = $sms_blacklist; return $this; } /** - * Gets updateExistingContacts + * Gets update_existing_contacts * * @return bool */ public function getUpdateExistingContacts() { - return $this->container['updateExistingContacts']; + return $this->container['update_existing_contacts']; } /** - * Sets updateExistingContacts + * Sets update_existing_contacts * - * @param bool $updateExistingContacts To facilitate the choice to update the existing contacts + * @param bool $update_existing_contacts To facilitate the choice to update the existing contacts * * @return $this */ - public function setUpdateExistingContacts($updateExistingContacts) + public function setUpdateExistingContacts($update_existing_contacts) { - $this->container['updateExistingContacts'] = $updateExistingContacts; + $this->container['update_existing_contacts'] = $update_existing_contacts; return $this; } /** - * Gets emptyContactsAttributes + * Gets empty_contacts_attributes * * @return bool */ public function getEmptyContactsAttributes() { - return $this->container['emptyContactsAttributes']; + return $this->container['empty_contacts_attributes']; } /** - * Sets emptyContactsAttributes + * Sets empty_contacts_attributes * - * @param bool $emptyContactsAttributes To facilitate the choice to erase any attribute of the existing contacts with empty value. emptyContactsAttributes = true means the empty fields in your import will erase any attribute that currently contain data in SendinBlue, & emptyContactsAttributes = false means the empty fields will not affect your existing data ( only available if `updateExistingContacts` set to true ) + * @param bool $empty_contacts_attributes To facilitate the choice to erase any attribute of the existing contacts with empty value. emptyContactsAttributes = true means the empty fields in your import will erase any attribute that currently contain data in SendinBlue, & emptyContactsAttributes = false means the empty fields will not affect your existing data ( only available if `updateExistingContacts` set to true ) * * @return $this */ - public function setEmptyContactsAttributes($emptyContactsAttributes) + public function setEmptyContactsAttributes($empty_contacts_attributes) { - $this->container['emptyContactsAttributes'] = $emptyContactsAttributes; + $this->container['empty_contacts_attributes'] = $empty_contacts_attributes; return $this; } @@ -504,6 +474,7 @@ public function setEmptyContactsAttributes($emptyContactsAttributes) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -516,6 +487,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -529,6 +501,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -545,6 +518,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/RequestContactImportNewList.php b/lib/Model/RequestContactImportNewList.php index 45c07c94..cbeacc1e 100644 --- a/lib/Model/RequestContactImportNewList.php +++ b/lib/Model/RequestContactImportNewList.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -58,8 +58,8 @@ class RequestContactImportNewList implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'listName' => 'string', - 'folderId' => 'int' + 'list_name' => 'string', + 'folder_id' => 'int' ]; /** @@ -68,8 +68,8 @@ class RequestContactImportNewList implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'listName' => null, - 'folderId' => 'int64' + 'list_name' => null, + 'folder_id' => 'int64' ]; /** @@ -99,8 +99,8 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'listName' => 'listName', - 'folderId' => 'folderId' + 'list_name' => 'listName', + 'folder_id' => 'folderId' ]; /** @@ -109,8 +109,8 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'listName' => 'setListName', - 'folderId' => 'setFolderId' + 'list_name' => 'setListName', + 'folder_id' => 'setFolderId' ]; /** @@ -119,8 +119,8 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'listName' => 'getListName', - 'folderId' => 'getFolderId' + 'list_name' => 'getListName', + 'folder_id' => 'getFolderId' ]; /** @@ -183,8 +183,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['listName'] = isset($data['listName']) ? $data['listName'] : null; - $this->container['folderId'] = isset($data['folderId']) ? $data['folderId'] : null; + $this->container['list_name'] = isset($data['list_name']) ? $data['list_name'] : null; + $this->container['folder_id'] = isset($data['folder_id']) ? $data['folder_id'] : null; } /** @@ -212,49 +212,49 @@ public function valid() /** - * Gets listName + * Gets list_name * * @return string */ public function getListName() { - return $this->container['listName']; + return $this->container['list_name']; } /** - * Sets listName + * Sets list_name * - * @param string $listName List with listName will be created first and users will be imported in it (Mandatory if listIds is empty). + * @param string $list_name List with listName will be created first and users will be imported in it (Mandatory if listIds is empty). * * @return $this */ - public function setListName($listName) + public function setListName($list_name) { - $this->container['listName'] = $listName; + $this->container['list_name'] = $list_name; return $this; } /** - * Gets folderId + * Gets folder_id * * @return int */ public function getFolderId() { - return $this->container['folderId']; + return $this->container['folder_id']; } /** - * Sets folderId + * Sets folder_id * - * @param int $folderId Id of the folder where this new list shall be created (Mandatory if listName is not empty). + * @param int $folder_id Id of the folder where this new list shall be created (Mandatory if listName is not empty). * * @return $this */ - public function setFolderId($folderId) + public function setFolderId($folder_id) { - $this->container['folderId'] = $folderId; + $this->container['folder_id'] = $folder_id; return $this; } @@ -265,6 +265,7 @@ public function setFolderId($folderId) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -277,6 +278,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -290,6 +292,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -306,6 +309,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/RequestSmsRecipientExport.php b/lib/Model/RequestSmsRecipientExport.php index 4a35db0c..1123604e 100644 --- a/lib/Model/RequestSmsRecipientExport.php +++ b/lib/Model/RequestSmsRecipientExport.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -57,8 +57,8 @@ class RequestSmsRecipientExport implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'notifyURL' => 'string', - 'recipientsType' => 'string' + 'notify_url' => 'string', + 'recipients_type' => 'string' ]; /** @@ -67,8 +67,8 @@ class RequestSmsRecipientExport implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'notifyURL' => 'url', - 'recipientsType' => null + 'notify_url' => 'url', + 'recipients_type' => null ]; /** @@ -98,8 +98,8 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'notifyURL' => 'notifyURL', - 'recipientsType' => 'recipientsType' + 'notify_url' => 'notifyURL', + 'recipients_type' => 'recipientsType' ]; /** @@ -108,8 +108,8 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'notifyURL' => 'setNotifyURL', - 'recipientsType' => 'setRecipientsType' + 'notify_url' => 'setNotifyUrl', + 'recipients_type' => 'setRecipientsType' ]; /** @@ -118,8 +118,8 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'notifyURL' => 'getNotifyURL', - 'recipientsType' => 'getRecipientsType' + 'notify_url' => 'getNotifyUrl', + 'recipients_type' => 'getRecipientsType' ]; /** @@ -205,8 +205,8 @@ public function getRecipientsTypeAllowableValues() */ public function __construct(array $data = null) { - $this->container['notifyURL'] = isset($data['notifyURL']) ? $data['notifyURL'] : null; - $this->container['recipientsType'] = isset($data['recipientsType']) ? $data['recipientsType'] : null; + $this->container['notify_url'] = isset($data['notify_url']) ? $data['notify_url'] : null; + $this->container['recipients_type'] = isset($data['recipients_type']) ? $data['recipients_type'] : null; } /** @@ -218,13 +218,13 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['recipientsType'] === null) { - $invalidProperties[] = "'recipientsType' can't be null"; + if ($this->container['recipients_type'] === null) { + $invalidProperties[] = "'recipients_type' can't be null"; } $allowedValues = $this->getRecipientsTypeAllowableValues(); - if (!is_null($this->container['recipientsType']) && !in_array($this->container['recipientsType'], $allowedValues, true)) { + if (!is_null($this->container['recipients_type']) && !in_array($this->container['recipients_type'], $allowedValues, true)) { $invalidProperties[] = sprintf( - "invalid value for 'recipientsType', must be one of '%s'", + "invalid value for 'recipients_type', must be one of '%s'", implode("', '", $allowedValues) ); } @@ -245,58 +245,58 @@ public function valid() /** - * Gets notifyURL + * Gets notify_url * * @return string */ - public function getNotifyURL() + public function getNotifyUrl() { - return $this->container['notifyURL']; + return $this->container['notify_url']; } /** - * Sets notifyURL + * Sets notify_url * - * @param string $notifyURL URL that will be called once the export process is finished. For reference, https://help.sendinblue.com/hc/en-us/articles/360007666479 + * @param string $notify_url URL that will be called once the export process is finished. For reference, https://help.sendinblue.com/hc/en-us/articles/360007666479 * * @return $this */ - public function setNotifyURL($notifyURL) + public function setNotifyUrl($notify_url) { - $this->container['notifyURL'] = $notifyURL; + $this->container['notify_url'] = $notify_url; return $this; } /** - * Gets recipientsType + * Gets recipients_type * * @return string */ public function getRecipientsType() { - return $this->container['recipientsType']; + return $this->container['recipients_type']; } /** - * Sets recipientsType + * Sets recipients_type * - * @param string $recipientsType Filter the recipients based on how they interacted with the campaign + * @param string $recipients_type Filter the recipients based on how they interacted with the campaign * * @return $this */ - public function setRecipientsType($recipientsType) + public function setRecipientsType($recipients_type) { $allowedValues = $this->getRecipientsTypeAllowableValues(); - if (!in_array($recipientsType, $allowedValues, true)) { + if (!in_array($recipients_type, $allowedValues, true)) { throw new \InvalidArgumentException( sprintf( - "Invalid value for 'recipientsType', must be one of '%s'", + "Invalid value for 'recipients_type', must be one of '%s'", implode("', '", $allowedValues) ) ); } - $this->container['recipientsType'] = $recipientsType; + $this->container['recipients_type'] = $recipients_type; return $this; } @@ -307,6 +307,7 @@ public function setRecipientsType($recipientsType) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -319,6 +320,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -332,6 +334,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -348,6 +351,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/ScheduleSmtpEmail.php b/lib/Model/ScheduleSmtpEmail.php deleted file mode 100644 index df52d407..00000000 --- a/lib/Model/ScheduleSmtpEmail.php +++ /dev/null @@ -1,361 +0,0 @@ - 'string', - 'messageIds' => 'string[]', - 'batchId' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'messageId' => null, - 'messageIds' => null, - 'batchId' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'messageId' => 'messageId', - 'messageIds' => 'messageIds', - 'batchId' => 'batchId' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'messageId' => 'setMessageId', - 'messageIds' => 'setMessageIds', - 'batchId' => 'setBatchId' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'messageId' => 'getMessageId', - 'messageIds' => 'getMessageIds', - 'batchId' => 'getBatchId' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['messageId'] = isset($data['messageId']) ? $data['messageId'] : null; - $this->container['messageIds'] = isset($data['messageIds']) ? $data['messageIds'] : null; - $this->container['batchId'] = isset($data['batchId']) ? $data['batchId'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets messageId - * - * @return string - */ - public function getMessageId() - { - return $this->container['messageId']; - } - - /** - * Sets messageId - * - * @param string $messageId Message ID of the transactional email scheduled - * - * @return $this - */ - public function setMessageId($messageId) - { - $this->container['messageId'] = $messageId; - - return $this; - } - - /** - * Gets messageIds - * - * @return string[] - */ - public function getMessageIds() - { - return $this->container['messageIds']; - } - - /** - * Sets messageIds - * - * @param string[] $messageIds messageIds - * - * @return $this - */ - public function setMessageIds($messageIds) - { - $this->container['messageIds'] = $messageIds; - - return $this; - } - - /** - * Gets batchId - * - * @return string - */ - public function getBatchId() - { - return $this->container['batchId']; - } - - /** - * Sets batchId - * - * @param string $batchId Batch ID of the batch transactional email scheduled - * - * @return $this - */ - public function setBatchId($batchId) - { - $this->container['batchId'] = $batchId; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/UpdateBatchContactsContacts.php b/lib/Model/SendEmail.php similarity index 55% rename from lib/Model/UpdateBatchContactsContacts.php rename to lib/Model/SendEmail.php index 6e465155..949be263 100644 --- a/lib/Model/UpdateBatchContactsContacts.php +++ b/lib/Model/SendEmail.php @@ -1,6 +1,6 @@ 'string', - 'id' => 'int', - 'sms' => 'string', - 'attributes' => 'map[string,object]', - 'emailBlacklisted' => 'bool', - 'smsBlacklisted' => 'bool', - 'listIds' => 'int[]', - 'unlinkListIds' => 'int[]', - 'smtpBlacklistSender' => 'string[]' + 'email_to' => 'string[]', + 'email_bcc' => 'string[]', + 'email_cc' => 'string[]', + 'reply_to' => 'string', + 'attachment_url' => 'string', + 'attachment' => '\SendinBlue\Client\Model\SendEmailAttachment[]', + 'headers' => 'object', + 'attributes' => 'object', + 'tags' => 'string[]' ]; /** @@ -74,15 +74,15 @@ class UpdateBatchContactsContacts implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'email' => 'email', - 'id' => 'int64', - 'sms' => null, + 'email_to' => 'email', + 'email_bcc' => 'email', + 'email_cc' => 'email', + 'reply_to' => 'email', + 'attachment_url' => 'url', + 'attachment' => null, + 'headers' => null, 'attributes' => null, - 'emailBlacklisted' => null, - 'smsBlacklisted' => null, - 'listIds' => 'int64', - 'unlinkListIds' => 'int64', - 'smtpBlacklistSender' => 'email' + 'tags' => null ]; /** @@ -112,15 +112,15 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'email' => 'email', - 'id' => 'id', - 'sms' => 'sms', + 'email_to' => 'emailTo', + 'email_bcc' => 'emailBcc', + 'email_cc' => 'emailCc', + 'reply_to' => 'replyTo', + 'attachment_url' => 'attachmentUrl', + 'attachment' => 'attachment', + 'headers' => 'headers', 'attributes' => 'attributes', - 'emailBlacklisted' => 'emailBlacklisted', - 'smsBlacklisted' => 'smsBlacklisted', - 'listIds' => 'listIds', - 'unlinkListIds' => 'unlinkListIds', - 'smtpBlacklistSender' => 'smtpBlacklistSender' + 'tags' => 'tags' ]; /** @@ -129,15 +129,15 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'email' => 'setEmail', - 'id' => 'setId', - 'sms' => 'setSms', + 'email_to' => 'setEmailTo', + 'email_bcc' => 'setEmailBcc', + 'email_cc' => 'setEmailCc', + 'reply_to' => 'setReplyTo', + 'attachment_url' => 'setAttachmentUrl', + 'attachment' => 'setAttachment', + 'headers' => 'setHeaders', 'attributes' => 'setAttributes', - 'emailBlacklisted' => 'setEmailBlacklisted', - 'smsBlacklisted' => 'setSmsBlacklisted', - 'listIds' => 'setListIds', - 'unlinkListIds' => 'setUnlinkListIds', - 'smtpBlacklistSender' => 'setSmtpBlacklistSender' + 'tags' => 'setTags' ]; /** @@ -146,15 +146,15 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'email' => 'getEmail', - 'id' => 'getId', - 'sms' => 'getSms', + 'email_to' => 'getEmailTo', + 'email_bcc' => 'getEmailBcc', + 'email_cc' => 'getEmailCc', + 'reply_to' => 'getReplyTo', + 'attachment_url' => 'getAttachmentUrl', + 'attachment' => 'getAttachment', + 'headers' => 'getHeaders', 'attributes' => 'getAttributes', - 'emailBlacklisted' => 'getEmailBlacklisted', - 'smsBlacklisted' => 'getSmsBlacklisted', - 'listIds' => 'getListIds', - 'unlinkListIds' => 'getUnlinkListIds', - 'smtpBlacklistSender' => 'getSmtpBlacklistSender' + 'tags' => 'getTags' ]; /** @@ -217,15 +217,15 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['email'] = isset($data['email']) ? $data['email'] : null; - $this->container['id'] = isset($data['id']) ? $data['id'] : null; - $this->container['sms'] = isset($data['sms']) ? $data['sms'] : null; + $this->container['email_to'] = isset($data['email_to']) ? $data['email_to'] : null; + $this->container['email_bcc'] = isset($data['email_bcc']) ? $data['email_bcc'] : null; + $this->container['email_cc'] = isset($data['email_cc']) ? $data['email_cc'] : null; + $this->container['reply_to'] = isset($data['reply_to']) ? $data['reply_to'] : null; + $this->container['attachment_url'] = isset($data['attachment_url']) ? $data['attachment_url'] : null; + $this->container['attachment'] = isset($data['attachment']) ? $data['attachment'] : null; + $this->container['headers'] = isset($data['headers']) ? $data['headers'] : null; $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; - $this->container['emailBlacklisted'] = isset($data['emailBlacklisted']) ? $data['emailBlacklisted'] : null; - $this->container['smsBlacklisted'] = isset($data['smsBlacklisted']) ? $data['smsBlacklisted'] : null; - $this->container['listIds'] = isset($data['listIds']) ? $data['listIds'] : null; - $this->container['unlinkListIds'] = isset($data['unlinkListIds']) ? $data['unlinkListIds'] : null; - $this->container['smtpBlacklistSender'] = isset($data['smtpBlacklistSender']) ? $data['smtpBlacklistSender'] : null; + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; } /** @@ -237,6 +237,9 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['email_to'] === null) { + $invalidProperties[] = "'email_to' can't be null"; + } return $invalidProperties; } @@ -253,217 +256,217 @@ public function valid() /** - * Gets email + * Gets email_to * - * @return string + * @return string[] */ - public function getEmail() + public function getEmailTo() { - return $this->container['email']; + return $this->container['email_to']; } /** - * Sets email + * Sets email_to * - * @param string $email Email address of the user to be updated (For each operation only pass one of the supported contact identifiers. Email, id or sms) + * @param string[] $email_to List of the email addresses of the recipients. For example, ['abc@example.com', 'asd@example.com']. * * @return $this */ - public function setEmail($email) + public function setEmailTo($email_to) { - $this->container['email'] = $email; + $this->container['email_to'] = $email_to; return $this; } /** - * Gets id + * Gets email_bcc * - * @return int + * @return string[] */ - public function getId() + public function getEmailBcc() { - return $this->container['id']; + return $this->container['email_bcc']; } /** - * Sets id + * Sets email_bcc * - * @param int $id id of the user to be updated (For each operation only pass one of the supported contact identifiers. Email, id or sms) + * @param string[] $email_bcc List of the email addresses of the recipients in bcc * * @return $this */ - public function setId($id) + public function setEmailBcc($email_bcc) { - $this->container['id'] = $id; + $this->container['email_bcc'] = $email_bcc; return $this; } /** - * Gets sms + * Gets email_cc * - * @return string + * @return string[] */ - public function getSms() + public function getEmailCc() { - return $this->container['sms']; + return $this->container['email_cc']; } /** - * Sets sms + * Sets email_cc * - * @param string $sms SMS of the user to be updated (For each operation only pass one of the supported contact identifiers. Email, id or sms) + * @param string[] $email_cc List of the email addresses of the recipients in cc * * @return $this */ - public function setSms($sms) + public function setEmailCc($email_cc) { - $this->container['sms'] = $sms; + $this->container['email_cc'] = $email_cc; return $this; } /** - * Gets attributes + * Gets reply_to * - * @return map[string,object] + * @return string */ - public function getAttributes() + public function getReplyTo() { - return $this->container['attributes']; + return $this->container['reply_to']; } /** - * Sets attributes + * Sets reply_to * - * @param map[string,object] $attributes Pass the set of attributes to be updated. **These attributes must be present in your account**. To update existing email address of a contact with the new one please pass EMAIL in attribtes. For example, **{ \"EMAIL\":\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\":\"Roger\"}**. Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in **SMS** field should be passed with proper country code. For example: **{\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"}** + * @param string $reply_to Email address which shall be used by campaign recipients to reply back * * @return $this */ - public function setAttributes($attributes) + public function setReplyTo($reply_to) { - $this->container['attributes'] = $attributes; + $this->container['reply_to'] = $reply_to; return $this; } /** - * Gets emailBlacklisted + * Gets attachment_url * - * @return bool + * @return string */ - public function getEmailBlacklisted() + public function getAttachmentUrl() { - return $this->container['emailBlacklisted']; + return $this->container['attachment_url']; } /** - * Sets emailBlacklisted + * Sets attachment_url * - * @param bool $emailBlacklisted Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true) + * @param string $attachment_url Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps * * @return $this */ - public function setEmailBlacklisted($emailBlacklisted) + public function setAttachmentUrl($attachment_url) { - $this->container['emailBlacklisted'] = $emailBlacklisted; + $this->container['attachment_url'] = $attachment_url; return $this; } /** - * Gets smsBlacklisted + * Gets attachment * - * @return bool + * @return \SendinBlue\Client\Model\SendEmailAttachment[] */ - public function getSmsBlacklisted() + public function getAttachment() { - return $this->container['smsBlacklisted']; + return $this->container['attachment']; } /** - * Sets smsBlacklisted + * Sets attachment * - * @param bool $smsBlacklisted Set/unset this field to blacklist/allow the contact for SMS (smsBlacklisted = true) + * @param \SendinBlue\Client\Model\SendEmailAttachment[] $attachment Pass the list of content (base64 encoded) and name of the attachment. For example, [{\"content\":\"base64 encoded content 1\", \"name\":\"attcahment1\"}, {\"content\":\"base64 encoded content 2\", \"name\":\"attcahment2\"}]. * * @return $this */ - public function setSmsBlacklisted($smsBlacklisted) + public function setAttachment($attachment) { - $this->container['smsBlacklisted'] = $smsBlacklisted; + $this->container['attachment'] = $attachment; return $this; } /** - * Gets listIds + * Gets headers * - * @return int[] + * @return object */ - public function getListIds() + public function getHeaders() { - return $this->container['listIds']; + return $this->container['headers']; } /** - * Sets listIds + * Sets headers * - * @param int[] $listIds Ids of the lists to add the contact to + * @param object $headers Pass the set of headers that shall be sent along the mail headers in the original email. 'sender.ip' header can be set (only for dedicated ip users) to mention the IP to be used for sending transactional emails. Headers are allowed in `This-Case-Only` (i.e. words separated by hyphen with first letter of each word in capital letter), they will be converted to such case styling if not in this format in the request payload. For example, {\"Content-Type\":\"text/html\", \"charset\":\"iso-8859-1\", \"sender.ip\":\"1.2.3.4\"} * * @return $this */ - public function setListIds($listIds) + public function setHeaders($headers) { - $this->container['listIds'] = $listIds; + $this->container['headers'] = $headers; return $this; } /** - * Gets unlinkListIds + * Gets attributes * - * @return int[] + * @return object */ - public function getUnlinkListIds() + public function getAttributes() { - return $this->container['unlinkListIds']; + return $this->container['attributes']; } /** - * Sets unlinkListIds + * Sets attributes * - * @param int[] $unlinkListIds Ids of the lists to remove the contact from + * @param object $attributes Pass the set of attributes to customize the template. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"} * * @return $this */ - public function setUnlinkListIds($unlinkListIds) + public function setAttributes($attributes) { - $this->container['unlinkListIds'] = $unlinkListIds; + $this->container['attributes'] = $attributes; return $this; } /** - * Gets smtpBlacklistSender + * Gets tags * * @return string[] */ - public function getSmtpBlacklistSender() + public function getTags() { - return $this->container['smtpBlacklistSender']; + return $this->container['tags']; } /** - * Sets smtpBlacklistSender + * Sets tags * - * @param string[] $smtpBlacklistSender transactional email forbidden sender for contact. Use only for email Contact + * @param string[] $tags Tag your emails to find them more easily * * @return $this */ - public function setSmtpBlacklistSender($smtpBlacklistSender) + public function setTags($tags) { - $this->container['smtpBlacklistSender'] = $smtpBlacklistSender; + $this->container['tags'] = $tags; return $this; } @@ -474,6 +477,7 @@ public function setSmtpBlacklistSender($smtpBlacklistSender) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -486,6 +490,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -499,6 +504,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -515,6 +521,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/SendSmtpEmailTo1.php b/lib/Model/SendEmailAttachment.php similarity index 78% rename from lib/Model/SendSmtpEmailTo1.php rename to lib/Model/SendEmailAttachment.php index 8f8f12a1..c91bbb70 100644 --- a/lib/Model/SendSmtpEmailTo1.php +++ b/lib/Model/SendEmailAttachment.php @@ -1,6 +1,6 @@ 'string', + 'content' => 'string', 'name' => 'string' ]; @@ -67,7 +67,7 @@ class SendSmtpEmailTo1 implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'email' => 'email', + 'content' => 'byte', 'name' => null ]; @@ -98,7 +98,7 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'email' => 'email', + 'content' => 'content', 'name' => 'name' ]; @@ -108,7 +108,7 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'email' => 'setEmail', + 'content' => 'setContent', 'name' => 'setName' ]; @@ -118,7 +118,7 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'email' => 'getEmail', + 'content' => 'getContent', 'name' => 'getName' ]; @@ -182,7 +182,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['content'] = isset($data['content']) ? $data['content'] : null; $this->container['name'] = isset($data['name']) ? $data['name'] : null; } @@ -195,8 +195,15 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['email'] === null) { - $invalidProperties[] = "'email' can't be null"; + if ($this->container['content'] === null) { + $invalidProperties[] = "'content' can't be null"; + } + if (!preg_match("/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/", $this->container['content'])) { + $invalidProperties[] = "invalid value for 'content', must be conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/."; + } + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; } return $invalidProperties; } @@ -214,25 +221,30 @@ public function valid() /** - * Gets email + * Gets content * * @return string */ - public function getEmail() + public function getContent() { - return $this->container['email']; + return $this->container['content']; } /** - * Sets email + * Sets content * - * @param string $email Email address of the recipient + * @param string $content Base64 encoded chunk data of the attachment generated on the fly * * @return $this */ - public function setEmail($email) + public function setContent($content) { - $this->container['email'] = $email; + + if ((!preg_match("/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/", $content))) { + throw new \InvalidArgumentException("invalid value for $content when calling SendEmailAttachment., must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/."); + } + + $this->container['content'] = $content; return $this; } @@ -250,7 +262,7 @@ public function getName() /** * Sets name * - * @param string $name Name of the recipient. **Maximum allowed characters are 70**. + * @param string $name Required for content. Name of the attachment * * @return $this */ @@ -267,6 +279,7 @@ public function setName($name) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -279,6 +292,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -292,6 +306,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -308,6 +323,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/SendReport.php b/lib/Model/SendReport.php index 16a42782..56a02151 100644 --- a/lib/Model/SendReport.php +++ b/lib/Model/SendReport.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -307,6 +307,7 @@ public function setEmail($email) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -319,6 +320,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -332,6 +334,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -348,6 +351,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/SendReportEmail.php b/lib/Model/SendReportEmail.php index 01f2453c..f1483f38 100644 --- a/lib/Model/SendReportEmail.php +++ b/lib/Model/SendReportEmail.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -271,6 +271,7 @@ public function setBody($body) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -283,6 +284,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -296,6 +298,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -312,6 +315,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/SendSms.php b/lib/Model/SendSms.php index d33df570..c017f3fd 100644 --- a/lib/Model/SendSms.php +++ b/lib/Model/SendSms.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -58,10 +58,10 @@ class SendSms implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'reference' => 'string', - 'messageId' => 'int', - 'smsCount' => 'int', - 'usedCredits' => 'float', - 'remainingCredits' => 'float' + 'message_id' => 'int', + 'sms_count' => 'int', + 'used_credits' => 'float', + 'remaining_credits' => 'float' ]; /** @@ -71,10 +71,10 @@ class SendSms implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'reference' => null, - 'messageId' => 'int64', - 'smsCount' => 'int64', - 'usedCredits' => 'float', - 'remainingCredits' => 'float' + 'message_id' => 'int64', + 'sms_count' => 'int64', + 'used_credits' => 'float', + 'remaining_credits' => 'float' ]; /** @@ -105,10 +105,10 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'reference' => 'reference', - 'messageId' => 'messageId', - 'smsCount' => 'smsCount', - 'usedCredits' => 'usedCredits', - 'remainingCredits' => 'remainingCredits' + 'message_id' => 'messageId', + 'sms_count' => 'smsCount', + 'used_credits' => 'usedCredits', + 'remaining_credits' => 'remainingCredits' ]; /** @@ -118,10 +118,10 @@ public static function swaggerFormats() */ protected static $setters = [ 'reference' => 'setReference', - 'messageId' => 'setMessageId', - 'smsCount' => 'setSmsCount', - 'usedCredits' => 'setUsedCredits', - 'remainingCredits' => 'setRemainingCredits' + 'message_id' => 'setMessageId', + 'sms_count' => 'setSmsCount', + 'used_credits' => 'setUsedCredits', + 'remaining_credits' => 'setRemainingCredits' ]; /** @@ -131,10 +131,10 @@ public static function swaggerFormats() */ protected static $getters = [ 'reference' => 'getReference', - 'messageId' => 'getMessageId', - 'smsCount' => 'getSmsCount', - 'usedCredits' => 'getUsedCredits', - 'remainingCredits' => 'getRemainingCredits' + 'message_id' => 'getMessageId', + 'sms_count' => 'getSmsCount', + 'used_credits' => 'getUsedCredits', + 'remaining_credits' => 'getRemainingCredits' ]; /** @@ -198,10 +198,10 @@ public function getModelName() public function __construct(array $data = null) { $this->container['reference'] = isset($data['reference']) ? $data['reference'] : null; - $this->container['messageId'] = isset($data['messageId']) ? $data['messageId'] : null; - $this->container['smsCount'] = isset($data['smsCount']) ? $data['smsCount'] : null; - $this->container['usedCredits'] = isset($data['usedCredits']) ? $data['usedCredits'] : null; - $this->container['remainingCredits'] = isset($data['remainingCredits']) ? $data['remainingCredits'] : null; + $this->container['message_id'] = isset($data['message_id']) ? $data['message_id'] : null; + $this->container['sms_count'] = isset($data['sms_count']) ? $data['sms_count'] : null; + $this->container['used_credits'] = isset($data['used_credits']) ? $data['used_credits'] : null; + $this->container['remaining_credits'] = isset($data['remaining_credits']) ? $data['remaining_credits'] : null; } /** @@ -216,8 +216,8 @@ public function listInvalidProperties() if ($this->container['reference'] === null) { $invalidProperties[] = "'reference' can't be null"; } - if ($this->container['messageId'] === null) { - $invalidProperties[] = "'messageId' can't be null"; + if ($this->container['message_id'] === null) { + $invalidProperties[] = "'message_id' can't be null"; } return $invalidProperties; } @@ -259,97 +259,97 @@ public function setReference($reference) } /** - * Gets messageId + * Gets message_id * * @return int */ public function getMessageId() { - return $this->container['messageId']; + return $this->container['message_id']; } /** - * Sets messageId + * Sets message_id * - * @param int $messageId messageId + * @param int $message_id message_id * * @return $this */ - public function setMessageId($messageId) + public function setMessageId($message_id) { - $this->container['messageId'] = $messageId; + $this->container['message_id'] = $message_id; return $this; } /** - * Gets smsCount + * Gets sms_count * * @return int */ public function getSmsCount() { - return $this->container['smsCount']; + return $this->container['sms_count']; } /** - * Sets smsCount + * Sets sms_count * - * @param int $smsCount Count of SMS's to send multiple text messages + * @param int $sms_count Count of SMS's to send multiple text messages * * @return $this */ - public function setSmsCount($smsCount) + public function setSmsCount($sms_count) { - $this->container['smsCount'] = $smsCount; + $this->container['sms_count'] = $sms_count; return $this; } /** - * Gets usedCredits + * Gets used_credits * * @return float */ public function getUsedCredits() { - return $this->container['usedCredits']; + return $this->container['used_credits']; } /** - * Sets usedCredits + * Sets used_credits * - * @param float $usedCredits SMS credits used per text message + * @param float $used_credits SMS credits used per text message * * @return $this */ - public function setUsedCredits($usedCredits) + public function setUsedCredits($used_credits) { - $this->container['usedCredits'] = $usedCredits; + $this->container['used_credits'] = $used_credits; return $this; } /** - * Gets remainingCredits + * Gets remaining_credits * * @return float */ public function getRemainingCredits() { - return $this->container['remainingCredits']; + return $this->container['remaining_credits']; } /** - * Sets remainingCredits + * Sets remaining_credits * - * @param float $remainingCredits Remaining SMS credits of the user + * @param float $remaining_credits Remaining SMS credits of the user * * @return $this */ - public function setRemainingCredits($remainingCredits) + public function setRemainingCredits($remaining_credits) { - $this->container['remainingCredits'] = $remainingCredits; + $this->container['remaining_credits'] = $remaining_credits; return $this; } @@ -360,6 +360,7 @@ public function setRemainingCredits($remainingCredits) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -372,6 +373,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -385,6 +387,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -401,6 +404,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/SendSmtpEmail.php b/lib/Model/SendSmtpEmail.php index 6589d8ef..ea3ad0c8 100644 --- a/lib/Model/SendSmtpEmail.php +++ b/lib/Model/SendSmtpEmail.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -61,18 +61,15 @@ class SendSmtpEmail implements ModelInterface, ArrayAccess 'to' => '\SendinBlue\Client\Model\SendSmtpEmailTo[]', 'bcc' => '\SendinBlue\Client\Model\SendSmtpEmailBcc[]', 'cc' => '\SendinBlue\Client\Model\SendSmtpEmailCc[]', - 'htmlContent' => 'string', - 'textContent' => 'string', + 'html_content' => 'string', + 'text_content' => 'string', 'subject' => 'string', - 'replyTo' => '\SendinBlue\Client\Model\SendSmtpEmailReplyTo', + 'reply_to' => '\SendinBlue\Client\Model\SendSmtpEmailReplyTo', 'attachment' => '\SendinBlue\Client\Model\SendSmtpEmailAttachment[]', 'headers' => 'object', - 'templateId' => 'int', + 'template_id' => 'int', 'params' => 'object', - 'messageVersions' => '\SendinBlue\Client\Model\SendSmtpEmailMessageVersions[]', - 'tags' => 'string[]', - 'scheduledAt' => '\DateTime', - 'batchId' => 'string' + 'tags' => 'string[]' ]; /** @@ -85,18 +82,15 @@ class SendSmtpEmail implements ModelInterface, ArrayAccess 'to' => null, 'bcc' => null, 'cc' => null, - 'htmlContent' => null, - 'textContent' => null, + 'html_content' => null, + 'text_content' => null, 'subject' => null, - 'replyTo' => null, + 'reply_to' => null, 'attachment' => null, 'headers' => null, - 'templateId' => 'int64', + 'template_id' => 'int64', 'params' => null, - 'messageVersions' => null, - 'tags' => null, - 'scheduledAt' => 'date-time', - 'batchId' => null + 'tags' => null ]; /** @@ -130,18 +124,15 @@ public static function swaggerFormats() 'to' => 'to', 'bcc' => 'bcc', 'cc' => 'cc', - 'htmlContent' => 'htmlContent', - 'textContent' => 'textContent', + 'html_content' => 'htmlContent', + 'text_content' => 'textContent', 'subject' => 'subject', - 'replyTo' => 'replyTo', + 'reply_to' => 'replyTo', 'attachment' => 'attachment', 'headers' => 'headers', - 'templateId' => 'templateId', + 'template_id' => 'templateId', 'params' => 'params', - 'messageVersions' => 'messageVersions', - 'tags' => 'tags', - 'scheduledAt' => 'scheduledAt', - 'batchId' => 'batchId' + 'tags' => 'tags' ]; /** @@ -154,18 +145,15 @@ public static function swaggerFormats() 'to' => 'setTo', 'bcc' => 'setBcc', 'cc' => 'setCc', - 'htmlContent' => 'setHtmlContent', - 'textContent' => 'setTextContent', + 'html_content' => 'setHtmlContent', + 'text_content' => 'setTextContent', 'subject' => 'setSubject', - 'replyTo' => 'setReplyTo', + 'reply_to' => 'setReplyTo', 'attachment' => 'setAttachment', 'headers' => 'setHeaders', - 'templateId' => 'setTemplateId', + 'template_id' => 'setTemplateId', 'params' => 'setParams', - 'messageVersions' => 'setMessageVersions', - 'tags' => 'setTags', - 'scheduledAt' => 'setScheduledAt', - 'batchId' => 'setBatchId' + 'tags' => 'setTags' ]; /** @@ -178,18 +166,15 @@ public static function swaggerFormats() 'to' => 'getTo', 'bcc' => 'getBcc', 'cc' => 'getCc', - 'htmlContent' => 'getHtmlContent', - 'textContent' => 'getTextContent', + 'html_content' => 'getHtmlContent', + 'text_content' => 'getTextContent', 'subject' => 'getSubject', - 'replyTo' => 'getReplyTo', + 'reply_to' => 'getReplyTo', 'attachment' => 'getAttachment', 'headers' => 'getHeaders', - 'templateId' => 'getTemplateId', + 'template_id' => 'getTemplateId', 'params' => 'getParams', - 'messageVersions' => 'getMessageVersions', - 'tags' => 'getTags', - 'scheduledAt' => 'getScheduledAt', - 'batchId' => 'getBatchId' + 'tags' => 'getTags' ]; /** @@ -256,18 +241,15 @@ public function __construct(array $data = null) $this->container['to'] = isset($data['to']) ? $data['to'] : null; $this->container['bcc'] = isset($data['bcc']) ? $data['bcc'] : null; $this->container['cc'] = isset($data['cc']) ? $data['cc'] : null; - $this->container['htmlContent'] = isset($data['htmlContent']) ? $data['htmlContent'] : null; - $this->container['textContent'] = isset($data['textContent']) ? $data['textContent'] : null; + $this->container['html_content'] = isset($data['html_content']) ? $data['html_content'] : null; + $this->container['text_content'] = isset($data['text_content']) ? $data['text_content'] : null; $this->container['subject'] = isset($data['subject']) ? $data['subject'] : null; - $this->container['replyTo'] = isset($data['replyTo']) ? $data['replyTo'] : null; + $this->container['reply_to'] = isset($data['reply_to']) ? $data['reply_to'] : null; $this->container['attachment'] = isset($data['attachment']) ? $data['attachment'] : null; $this->container['headers'] = isset($data['headers']) ? $data['headers'] : null; - $this->container['templateId'] = isset($data['templateId']) ? $data['templateId'] : null; + $this->container['template_id'] = isset($data['template_id']) ? $data['template_id'] : null; $this->container['params'] = isset($data['params']) ? $data['params'] : null; - $this->container['messageVersions'] = isset($data['messageVersions']) ? $data['messageVersions'] : null; $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; - $this->container['scheduledAt'] = isset($data['scheduledAt']) ? $data['scheduledAt'] : null; - $this->container['batchId'] = isset($data['batchId']) ? $data['batchId'] : null; } /** @@ -279,6 +261,9 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['to'] === null) { + $invalidProperties[] = "'to' can't be null"; + } return $invalidProperties; } @@ -331,7 +316,7 @@ public function getTo() /** * Sets to * - * @param \SendinBlue\Client\Model\SendSmtpEmailTo[] $to Mandatory if messageVersions are not passed, ignored if messageVersions are passed. List of email addresses and names (optional) of the recipients. For example, [{\"name\":\"Jimmy\", \"email\":\"jimmy98@example.com\"}, {\"name\":\"Joe\", \"email\":\"joe@example.com\"}] + * @param \SendinBlue\Client\Model\SendSmtpEmailTo[] $to List of email addresses and names (optional) of the recipients. For example, [{\"name\":\"Jimmy\", \"email\":\"jimmy98@example.com\"}, {\"name\":\"Joe\", \"email\":\"joe@example.com\"}] * * @return $this */ @@ -391,49 +376,49 @@ public function setCc($cc) } /** - * Gets htmlContent + * Gets html_content * * @return string */ public function getHtmlContent() { - return $this->container['htmlContent']; + return $this->container['html_content']; } /** - * Sets htmlContent + * Sets html_content * - * @param string $htmlContent HTML body of the message ( Mandatory if 'templateId' is not passed, ignored if 'templateId' is passed ) + * @param string $html_content HTML body of the message ( Mandatory if 'templateId' is not passed, ignored if 'templateId' is passed ) * * @return $this */ - public function setHtmlContent($htmlContent) + public function setHtmlContent($html_content) { - $this->container['htmlContent'] = $htmlContent; + $this->container['html_content'] = $html_content; return $this; } /** - * Gets textContent + * Gets text_content * * @return string */ public function getTextContent() { - return $this->container['textContent']; + return $this->container['text_content']; } /** - * Sets textContent + * Sets text_content * - * @param string $textContent Plain Text body of the message ( Ignored if 'templateId' is passed ) + * @param string $text_content Plain Text body of the message ( Ignored if 'templateId' is passed ) * * @return $this */ - public function setTextContent($textContent) + public function setTextContent($text_content) { - $this->container['textContent'] = $textContent; + $this->container['text_content'] = $text_content; return $this; } @@ -463,25 +448,25 @@ public function setSubject($subject) } /** - * Gets replyTo + * Gets reply_to * * @return \SendinBlue\Client\Model\SendSmtpEmailReplyTo */ public function getReplyTo() { - return $this->container['replyTo']; + return $this->container['reply_to']; } /** - * Sets replyTo + * Sets reply_to * - * @param \SendinBlue\Client\Model\SendSmtpEmailReplyTo $replyTo replyTo + * @param \SendinBlue\Client\Model\SendSmtpEmailReplyTo $reply_to reply_to * * @return $this */ - public function setReplyTo($replyTo) + public function setReplyTo($reply_to) { - $this->container['replyTo'] = $replyTo; + $this->container['reply_to'] = $reply_to; return $this; } @@ -499,7 +484,7 @@ public function getAttachment() /** * Sets attachment * - * @param \SendinBlue\Client\Model\SendSmtpEmailAttachment[] $attachment Pass the absolute URL (no local file) or the base64 content of the attachment along with the attachment name (Mandatory if attachment content is passed). For example, `[{\"url\":\"https://attachment.domain.com/myAttachmentFromUrl.jpg\", \"name\":\"myAttachmentFromUrl.jpg\"}, {\"content\":\"base64 example content\", \"name\":\"myAttachmentFromBase64.jpg\"}]`. Allowed extensions for attachment file: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub, eps, odt, mp3, m4a, m4v, wma, ogg, flac, wav, aif, aifc, aiff, mp4, mov, avi, mkv, mpeg, mpg, wmv, pkpass and xlsm ( If 'templateId' is passed and is in New Template Language format then both attachment url and content are accepted. If template is in Old template Language format, then 'attachment' is ignored ) + * @param \SendinBlue\Client\Model\SendSmtpEmailAttachment[] $attachment Pass the absolute URL (no local file) or the base64 content of the attachment along with the attachment name (Mandatory if attachment content is passed). For example, `[{\"url\":\"https://attachment.domain.com/myAttachmentFromUrl.jpg\", \"name\":\"myAttachmentFromUrl.jpg\"}, {\"content\":\"base64 example content\", \"name\":\"myAttachmentFromBase64.jpg\"}]`. Allowed extensions for attachment file: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub, eps, odt, mp3, m4a, m4v, wma, ogg, flac, wav, aif, aifc, aiff, mp4, mov, avi, mkv, mpeg, mpg and wmv ( If 'templateId' is passed and is in New Template Language format then both attachment url and content are accepted. If template is in Old template Language format, then 'attachment' is ignored ) * * @return $this */ @@ -535,25 +520,25 @@ public function setHeaders($headers) } /** - * Gets templateId + * Gets template_id * * @return int */ public function getTemplateId() { - return $this->container['templateId']; + return $this->container['template_id']; } /** - * Sets templateId + * Sets template_id * - * @param int $templateId Id of the template. + * @param int $template_id Id of the template * * @return $this */ - public function setTemplateId($templateId) + public function setTemplateId($template_id) { - $this->container['templateId'] = $templateId; + $this->container['template_id'] = $template_id; return $this; } @@ -582,30 +567,6 @@ public function setParams($params) return $this; } - /** - * Gets messageVersions - * - * @return \SendinBlue\Client\Model\SendSmtpEmailMessageVersions[] - */ - public function getMessageVersions() - { - return $this->container['messageVersions']; - } - - /** - * Sets messageVersions - * - * @param \SendinBlue\Client\Model\SendSmtpEmailMessageVersions[] $messageVersions You can customize and send out multiple versions of a mail. templateId can be customized only if global parameter contains templateId. htmlContent and textContent can be customized only if any of the two, htmlContent or textContent, is present in global parameters. Some global parameters such as **to(mandatory), bcc, cc, replyTo, subject** can also be customized specific to each version. Total number of recipients in one API request must not exceed 2000. However, you can still pass upto 99 recipients maximum in one message version. The size of individual params in all the messageVersions shall not exceed 100 KB limit and that of cumulative params shall not exceed 1000 KB. You can follow this **step-by-step guide** on how to use **messageVersions** to batch send emails - https://developers.sendinblue.com/docs/batch-send-transactional-emails - * - * @return $this - */ - public function setMessageVersions($messageVersions) - { - $this->container['messageVersions'] = $messageVersions; - - return $this; - } - /** * Gets tags * @@ -629,54 +590,6 @@ public function setTags($tags) return $this; } - - /** - * Gets scheduledAt - * - * @return \DateTime - */ - public function getScheduledAt() - { - return $this->container['scheduledAt']; - } - - /** - * Sets scheduledAt - * - * @param \DateTime $scheduledAt UTC date-time on which the email has to schedule (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for scheduling. There can be an expected delay of +5 minutes in scheduled email delivery. **Please note this feature is currently a public beta**. - * - * @return $this - */ - public function setScheduledAt($scheduledAt) - { - $this->container['scheduledAt'] = $scheduledAt; - - return $this; - } - - /** - * Gets batchId - * - * @return string - */ - public function getBatchId() - { - return $this->container['batchId']; - } - - /** - * Sets batchId - * - * @param string $batchId Valid UUIDv4 batch id to identify the scheduled batches transactional email. If not passed we will create a valid UUIDv4 batch id at our end. - * - * @return $this - */ - public function setBatchId($batchId) - { - $this->container['batchId'] = $batchId; - - return $this; - } /** * Returns true if offset exists. False otherwise. * @@ -684,6 +597,7 @@ public function setBatchId($batchId) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -696,6 +610,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -709,6 +624,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -725,6 +641,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/SendSmtpEmailAttachment.php b/lib/Model/SendSmtpEmailAttachment.php index 7fa9333d..4f45f480 100644 --- a/lib/Model/SendSmtpEmailAttachment.php +++ b/lib/Model/SendSmtpEmailAttachment.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -303,6 +303,7 @@ public function setName($name) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -315,6 +316,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -328,6 +330,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -344,6 +347,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/SendSmtpEmailBcc.php b/lib/Model/SendSmtpEmailBcc.php index bb371ca1..545fa043 100644 --- a/lib/Model/SendSmtpEmailBcc.php +++ b/lib/Model/SendSmtpEmailBcc.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -267,6 +267,7 @@ public function setName($name) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -279,6 +280,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -292,6 +294,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -308,6 +311,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/SendSmtpEmailCc.php b/lib/Model/SendSmtpEmailCc.php index e14349a4..ac32b67e 100644 --- a/lib/Model/SendSmtpEmailCc.php +++ b/lib/Model/SendSmtpEmailCc.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -267,6 +267,7 @@ public function setName($name) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -279,6 +280,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -292,6 +294,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -308,6 +311,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/SendSmtpEmailMessageVersions.php b/lib/Model/SendSmtpEmailMessageVersions.php deleted file mode 100644 index 62cabdab..00000000 --- a/lib/Model/SendSmtpEmailMessageVersions.php +++ /dev/null @@ -1,454 +0,0 @@ - '\SendinBlue\Client\Model\SendSmtpEmailTo1[]', - 'params' => 'map[string,object]', - 'bcc' => '\SendinBlue\Client\Model\SendSmtpEmailBcc[]', - 'cc' => '\SendinBlue\Client\Model\SendSmtpEmailCc[]', - 'replyTo' => '\SendinBlue\Client\Model\SendSmtpEmailReplyTo1', - 'subject' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'to' => null, - 'params' => null, - 'bcc' => null, - 'cc' => null, - 'replyTo' => null, - 'subject' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'to' => 'to', - 'params' => 'params', - 'bcc' => 'bcc', - 'cc' => 'cc', - 'replyTo' => 'replyTo', - 'subject' => 'subject' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'to' => 'setTo', - 'params' => 'setParams', - 'bcc' => 'setBcc', - 'cc' => 'setCc', - 'replyTo' => 'setReplyTo', - 'subject' => 'setSubject' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'to' => 'getTo', - 'params' => 'getParams', - 'bcc' => 'getBcc', - 'cc' => 'getCc', - 'replyTo' => 'getReplyTo', - 'subject' => 'getSubject' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['to'] = isset($data['to']) ? $data['to'] : null; - $this->container['params'] = isset($data['params']) ? $data['params'] : null; - $this->container['bcc'] = isset($data['bcc']) ? $data['bcc'] : null; - $this->container['cc'] = isset($data['cc']) ? $data['cc'] : null; - $this->container['replyTo'] = isset($data['replyTo']) ? $data['replyTo'] : null; - $this->container['subject'] = isset($data['subject']) ? $data['subject'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['to'] === null) { - $invalidProperties[] = "'to' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets to - * - * @return \SendinBlue\Client\Model\SendSmtpEmailTo1[] - */ - public function getTo() - { - return $this->container['to']; - } - - /** - * Sets to - * - * @param \SendinBlue\Client\Model\SendSmtpEmailTo1[] $to List of email addresses and names (_optional_) of the recipients. For example, [{\"name\":\"Jimmy\", \"email\":\"jimmy98@example.com\"}, {\"name\":\"Joe\", \"email\":\"joe@example.com\"}] - * - * @return $this - */ - public function setTo($to) - { - $this->container['to'] = $to; - - return $this; - } - - /** - * Gets params - * - * @return map[string,object] - */ - public function getParams() - { - return $this->container['params']; - } - - /** - * Sets params - * - * @param map[string,object] $params Pass the set of attributes to customize the template. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. It's considered only if template is in New Template Language format. - * - * @return $this - */ - public function setParams($params) - { - $this->container['params'] = $params; - - return $this; - } - - /** - * Gets bcc - * - * @return \SendinBlue\Client\Model\SendSmtpEmailBcc[] - */ - public function getBcc() - { - return $this->container['bcc']; - } - - /** - * Sets bcc - * - * @param \SendinBlue\Client\Model\SendSmtpEmailBcc[] $bcc List of email addresses and names (optional) of the recipients in bcc - * - * @return $this - */ - public function setBcc($bcc) - { - $this->container['bcc'] = $bcc; - - return $this; - } - - /** - * Gets cc - * - * @return \SendinBlue\Client\Model\SendSmtpEmailCc[] - */ - public function getCc() - { - return $this->container['cc']; - } - - /** - * Sets cc - * - * @param \SendinBlue\Client\Model\SendSmtpEmailCc[] $cc List of email addresses and names (optional) of the recipients in cc - * - * @return $this - */ - public function setCc($cc) - { - $this->container['cc'] = $cc; - - return $this; - } - - /** - * Gets replyTo - * - * @return \SendinBlue\Client\Model\SendSmtpEmailReplyTo1 - */ - public function getReplyTo() - { - return $this->container['replyTo']; - } - - /** - * Sets replyTo - * - * @param \SendinBlue\Client\Model\SendSmtpEmailReplyTo1 $replyTo replyTo - * - * @return $this - */ - public function setReplyTo($replyTo) - { - $this->container['replyTo'] = $replyTo; - - return $this; - } - - /** - * Gets subject - * - * @return string - */ - public function getSubject() - { - return $this->container['subject']; - } - - /** - * Sets subject - * - * @param string $subject Custom subject specific to message version - * - * @return $this - */ - public function setSubject($subject) - { - $this->container['subject'] = $subject; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/SendSmtpEmailReplyTo.php b/lib/Model/SendSmtpEmailReplyTo.php index 9251efcf..db844780 100644 --- a/lib/Model/SendSmtpEmailReplyTo.php +++ b/lib/Model/SendSmtpEmailReplyTo.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -36,7 +36,7 @@ * SendSmtpEmailReplyTo Class Doc Comment * * @category Class - * @description Email (required), along with name (optional), on which transactional mail recipients will be able to reply back. For example, {\"email\":\"ann6533@example.com\", \"name\":\"Ann\"}. + * @description Email (required), along with name (optional), on which transactional mail recipients will be able to reply back. For example, {\"email\":\"ann6533@example.com\", \"name\":\"Ann\"}. * @package SendinBlue\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen @@ -268,6 +268,7 @@ public function setName($name) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -280,6 +281,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -293,6 +295,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -309,6 +312,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/SendSmtpEmailReplyTo1.php b/lib/Model/SendSmtpEmailReplyTo1.php deleted file mode 100644 index d7963ed1..00000000 --- a/lib/Model/SendSmtpEmailReplyTo1.php +++ /dev/null @@ -1,335 +0,0 @@ - 'string', - 'name' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'email' => 'email', - 'name' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'email' => 'email', - 'name' => 'name' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'email' => 'setEmail', - 'name' => 'setName' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'email' => 'getEmail', - 'name' => 'getName' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['email'] = isset($data['email']) ? $data['email'] : null; - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['email'] === null) { - $invalidProperties[] = "'email' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets email - * - * @return string - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string $email Email address in reply to - * - * @return $this - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name Name in reply to. Maximum allowed characters are 70. - * - * @return $this - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/SendSmtpEmailSender.php b/lib/Model/SendSmtpEmailSender.php index 114d1b5c..735065fb 100644 --- a/lib/Model/SendSmtpEmailSender.php +++ b/lib/Model/SendSmtpEmailSender.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -36,7 +36,7 @@ * SendSmtpEmailSender Class Doc Comment * * @category Class - * @description Mandatory if `templateId` is not passed. Pass `name` (optional) and `email` OR `id` of sender from which emails will be sent. `name` will be ignored if passed along with sender `id`. For example, {\"name\":\"Mary from MyShop\", \"email\":\"no-reply@myshop.com\"} or {\"id\":2} + * @description Mandatory if 'templateId' is not passed. Pass name (optional) and email of sender from which emails will be sent. For example, {\"name\":\"Mary from MyShop\", \"email\":\"no-reply@myshop.com\"} * @package SendinBlue\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen @@ -59,8 +59,7 @@ class SendSmtpEmailSender implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'name' => 'string', - 'email' => 'string', - 'id' => 'int' + 'email' => 'string' ]; /** @@ -70,8 +69,7 @@ class SendSmtpEmailSender implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'name' => null, - 'email' => 'email', - 'id' => 'int64' + 'email' => 'email' ]; /** @@ -102,8 +100,7 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'name' => 'name', - 'email' => 'email', - 'id' => 'id' + 'email' => 'email' ]; /** @@ -113,8 +110,7 @@ public static function swaggerFormats() */ protected static $setters = [ 'name' => 'setName', - 'email' => 'setEmail', - 'id' => 'setId' + 'email' => 'setEmail' ]; /** @@ -124,8 +120,7 @@ public static function swaggerFormats() */ protected static $getters = [ 'name' => 'getName', - 'email' => 'getEmail', - 'id' => 'getId' + 'email' => 'getEmail' ]; /** @@ -190,7 +185,6 @@ public function __construct(array $data = null) { $this->container['name'] = isset($data['name']) ? $data['name'] : null; $this->container['email'] = isset($data['email']) ? $data['email'] : null; - $this->container['id'] = isset($data['id']) ? $data['id'] : null; } /** @@ -202,6 +196,9 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } return $invalidProperties; } @@ -230,7 +227,7 @@ public function getName() /** * Sets name * - * @param string $name Name of the sender from which the emails will be sent. Maximum allowed characters are 70. Applicable only when email is passed. + * @param string $name Name of the sender from which the emails will be sent. Maximum allowed characters are 70. * * @return $this */ @@ -254,7 +251,7 @@ public function getEmail() /** * Sets email * - * @param string $email Email of the sender from which the emails will be sent. Mandatory if sender id is not passed. + * @param string $email Email of the sender from which the emails will be sent * * @return $this */ @@ -264,30 +261,6 @@ public function setEmail($email) return $this; } - - /** - * Gets id - * - * @return int - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param int $id Id of the sender from which the emails will be sent. In order to select a sender with specific pool of IP’s, dedicated ip users shall pass id (instead of email). Mandatory if email is not passed. - * - * @return $this - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } /** * Returns true if offset exists. False otherwise. * @@ -295,6 +268,7 @@ public function setId($id) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -307,6 +281,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -320,6 +295,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -336,6 +312,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/SendSmtpEmailTo.php b/lib/Model/SendSmtpEmailTo.php index 74b8f42d..ae173492 100644 --- a/lib/Model/SendSmtpEmailTo.php +++ b/lib/Model/SendSmtpEmailTo.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -267,6 +267,7 @@ public function setName($name) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -279,6 +280,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -292,6 +294,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -308,6 +311,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/InlineResponse201.php b/lib/Model/SendTemplateEmail.php similarity index 86% rename from lib/Model/InlineResponse201.php rename to lib/Model/SendTemplateEmail.php index 2c31ec72..8723bebc 100644 --- a/lib/Model/InlineResponse201.php +++ b/lib/Model/SendTemplateEmail.php @@ -1,6 +1,6 @@ 'string' + 'message_id' => 'string' ]; /** @@ -67,7 +66,7 @@ class InlineResponse201 implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'id' => null + 'message_id' => null ]; /** @@ -97,7 +96,7 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'id' => 'id' + 'message_id' => 'messageId' ]; /** @@ -106,7 +105,7 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'id' => 'setId' + 'message_id' => 'setMessageId' ]; /** @@ -115,7 +114,7 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'id' => 'getId' + 'message_id' => 'getMessageId' ]; /** @@ -178,7 +177,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['message_id'] = isset($data['message_id']) ? $data['message_id'] : null; } /** @@ -190,8 +189,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; + if ($this->container['message_id'] === null) { + $invalidProperties[] = "'message_id' can't be null"; } return $invalidProperties; } @@ -209,25 +208,25 @@ public function valid() /** - * Gets id + * Gets message_id * * @return string */ - public function getId() + public function getMessageId() { - return $this->container['id']; + return $this->container['message_id']; } /** - * Sets id + * Sets message_id * - * @param string $id Unique task id + * @param string $message_id Message ID of the template Email sent * * @return $this */ - public function setId($id) + public function setMessageId($message_id) { - $this->container['id'] = $id; + $this->container['message_id'] = $message_id; return $this; } @@ -238,6 +237,7 @@ public function setId($id) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -250,6 +250,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -263,6 +264,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -279,6 +281,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/SendTestEmail.php b/lib/Model/SendTestEmail.php index 07436411..549f3da8 100644 --- a/lib/Model/SendTestEmail.php +++ b/lib/Model/SendTestEmail.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -57,7 +57,7 @@ class SendTestEmail implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'emailTo' => 'string[]' + 'email_to' => 'string[]' ]; /** @@ -66,7 +66,7 @@ class SendTestEmail implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'emailTo' => 'email' + 'email_to' => 'email' ]; /** @@ -96,7 +96,7 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'emailTo' => 'emailTo' + 'email_to' => 'emailTo' ]; /** @@ -105,7 +105,7 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'emailTo' => 'setEmailTo' + 'email_to' => 'setEmailTo' ]; /** @@ -114,7 +114,7 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'emailTo' => 'getEmailTo' + 'email_to' => 'getEmailTo' ]; /** @@ -177,7 +177,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['emailTo'] = isset($data['emailTo']) ? $data['emailTo'] : null; + $this->container['email_to'] = isset($data['email_to']) ? $data['email_to'] : null; } /** @@ -205,25 +205,25 @@ public function valid() /** - * Gets emailTo + * Gets email_to * * @return string[] */ public function getEmailTo() { - return $this->container['emailTo']; + return $this->container['email_to']; } /** - * Sets emailTo + * Sets email_to * - * @param string[] $emailTo List of the email addresses of the recipients whom you wish to send the test mail. If left empty, the test mail will be sent to your entire test list. You can not send more than 50 test emails per day. + * @param string[] $email_to List of the email addresses of the recipients whom you wish to send the test mail. If left empty, the test mail will be sent to your entire test list. * * @return $this */ - public function setEmailTo($emailTo) + public function setEmailTo($email_to) { - $this->container['emailTo'] = $emailTo; + $this->container['email_to'] = $email_to; return $this; } @@ -234,6 +234,7 @@ public function setEmailTo($emailTo) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -246,6 +247,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -259,6 +261,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -275,6 +278,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/SendTestSms.php b/lib/Model/SendTestSms.php index 2a7a0146..8ec4ccf7 100644 --- a/lib/Model/SendTestSms.php +++ b/lib/Model/SendTestSms.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -57,7 +57,7 @@ class SendTestSms implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'phoneNumber' => 'string' + 'phone_number' => 'string' ]; /** @@ -66,7 +66,7 @@ class SendTestSms implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'phoneNumber' => null + 'phone_number' => null ]; /** @@ -96,7 +96,7 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'phoneNumber' => 'phoneNumber' + 'phone_number' => 'phoneNumber' ]; /** @@ -105,7 +105,7 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'phoneNumber' => 'setPhoneNumber' + 'phone_number' => 'setPhoneNumber' ]; /** @@ -114,7 +114,7 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'phoneNumber' => 'getPhoneNumber' + 'phone_number' => 'getPhoneNumber' ]; /** @@ -177,7 +177,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['phoneNumber'] = isset($data['phoneNumber']) ? $data['phoneNumber'] : null; + $this->container['phone_number'] = isset($data['phone_number']) ? $data['phone_number'] : null; } /** @@ -205,25 +205,25 @@ public function valid() /** - * Gets phoneNumber + * Gets phone_number * * @return string */ public function getPhoneNumber() { - return $this->container['phoneNumber']; + return $this->container['phone_number']; } /** - * Sets phoneNumber + * Sets phone_number * - * @param string $phoneNumber Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted + * @param string $phone_number Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted * * @return $this */ - public function setPhoneNumber($phoneNumber) + public function setPhoneNumber($phone_number) { - $this->container['phoneNumber'] = $phoneNumber; + $this->container['phone_number'] = $phone_number; return $this; } @@ -234,6 +234,7 @@ public function setPhoneNumber($phoneNumber) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -246,6 +247,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -259,6 +261,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -275,6 +278,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/SendTransacSms.php b/lib/Model/SendTransacSms.php index 7cbbab44..5c9176bc 100644 --- a/lib/Model/SendTransacSms.php +++ b/lib/Model/SendTransacSms.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -62,8 +62,7 @@ class SendTransacSms implements ModelInterface, ArrayAccess 'content' => 'string', 'type' => 'string', 'tag' => 'string', - 'webUrl' => 'string', - 'unicodeEnabled' => 'bool' + 'web_url' => 'string' ]; /** @@ -77,8 +76,7 @@ class SendTransacSms implements ModelInterface, ArrayAccess 'content' => null, 'type' => null, 'tag' => null, - 'webUrl' => 'url', - 'unicodeEnabled' => null + 'web_url' => 'url' ]; /** @@ -113,8 +111,7 @@ public static function swaggerFormats() 'content' => 'content', 'type' => 'type', 'tag' => 'tag', - 'webUrl' => 'webUrl', - 'unicodeEnabled' => 'unicodeEnabled' + 'web_url' => 'webUrl' ]; /** @@ -128,8 +125,7 @@ public static function swaggerFormats() 'content' => 'setContent', 'type' => 'setType', 'tag' => 'setTag', - 'webUrl' => 'setWebUrl', - 'unicodeEnabled' => 'setUnicodeEnabled' + 'web_url' => 'setWebUrl' ]; /** @@ -143,8 +139,7 @@ public static function swaggerFormats() 'content' => 'getContent', 'type' => 'getType', 'tag' => 'getTag', - 'webUrl' => 'getWebUrl', - 'unicodeEnabled' => 'getUnicodeEnabled' + 'web_url' => 'getWebUrl' ]; /** @@ -227,8 +222,7 @@ public function __construct(array $data = null) $this->container['content'] = isset($data['content']) ? $data['content'] : null; $this->container['type'] = isset($data['type']) ? $data['type'] : 'transactional'; $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; - $this->container['webUrl'] = isset($data['webUrl']) ? $data['webUrl'] : null; - $this->container['unicodeEnabled'] = isset($data['unicodeEnabled']) ? $data['unicodeEnabled'] : false; + $this->container['web_url'] = isset($data['web_url']) ? $data['web_url'] : null; } /** @@ -410,49 +404,25 @@ public function setTag($tag) } /** - * Gets webUrl + * Gets web_url * * @return string */ public function getWebUrl() { - return $this->container['webUrl']; + return $this->container['web_url']; } /** - * Sets webUrl + * Sets web_url * - * @param string $webUrl Webhook to call for each event triggered by the message (delivered etc.) + * @param string $web_url Webhook to call for each event triggered by the message (delivered etc.) * * @return $this */ - public function setWebUrl($webUrl) + public function setWebUrl($web_url) { - $this->container['webUrl'] = $webUrl; - - return $this; - } - - /** - * Gets unicodeEnabled - * - * @return bool - */ - public function getUnicodeEnabled() - { - return $this->container['unicodeEnabled']; - } - - /** - * Sets unicodeEnabled - * - * @param bool $unicodeEnabled Format of the message. It indicates whether the content should be treated as unicode or not. - * - * @return $this - */ - public function setUnicodeEnabled($unicodeEnabled) - { - $this->container['unicodeEnabled'] = $unicodeEnabled; + $this->container['web_url'] = $web_url; return $this; } @@ -463,6 +433,7 @@ public function setUnicodeEnabled($unicodeEnabled) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -475,6 +446,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -488,6 +460,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -504,6 +477,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/SsoTokenRequest.php b/lib/Model/SsoTokenRequest.php deleted file mode 100644 index 47996e7e..00000000 --- a/lib/Model/SsoTokenRequest.php +++ /dev/null @@ -1,334 +0,0 @@ - 'int', - 'email' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'id' => 'int64', - 'email' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'id' => 'id', - 'email' => 'email' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'id' => 'setId', - 'email' => 'setEmail' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'id' => 'getId', - 'email' => 'getEmail' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['id'] = isset($data['id']) ? $data['id'] : null; - $this->container['email'] = isset($data['email']) ? $data['email'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets id - * - * @return int - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param int $id Id of the sub-account organization - * - * @return $this - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets email - * - * @return string - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string $email User email of sub-account organization - * - * @return $this - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/SubAccountDetailsResponse.php b/lib/Model/SubAccountDetailsResponse.php deleted file mode 100644 index ff6fbf71..00000000 --- a/lib/Model/SubAccountDetailsResponse.php +++ /dev/null @@ -1,391 +0,0 @@ - 'string', - 'email' => 'string', - 'companyName' => 'string', - 'planInfo' => '\SendinBlue\Client\Model\SubAccountDetailsResponsePlanInfo' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'name' => null, - 'email' => null, - 'companyName' => null, - 'planInfo' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'name' => 'name', - 'email' => 'email', - 'companyName' => 'companyName', - 'planInfo' => 'planInfo' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'name' => 'setName', - 'email' => 'setEmail', - 'companyName' => 'setCompanyName', - 'planInfo' => 'setPlanInfo' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'name' => 'getName', - 'email' => 'getEmail', - 'companyName' => 'getCompanyName', - 'planInfo' => 'getPlanInfo' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - $this->container['email'] = isset($data['email']) ? $data['email'] : null; - $this->container['companyName'] = isset($data['companyName']) ? $data['companyName'] : null; - $this->container['planInfo'] = isset($data['planInfo']) ? $data['planInfo'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name Name of the sub-account user - * - * @return $this - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets email - * - * @return string - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string $email Email id of the sub-account organization - * - * @return $this - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets companyName - * - * @return string - */ - public function getCompanyName() - { - return $this->container['companyName']; - } - - /** - * Sets companyName - * - * @param string $companyName Sub-account company name - * - * @return $this - */ - public function setCompanyName($companyName) - { - $this->container['companyName'] = $companyName; - - return $this; - } - - /** - * Gets planInfo - * - * @return \SendinBlue\Client\Model\SubAccountDetailsResponsePlanInfo - */ - public function getPlanInfo() - { - return $this->container['planInfo']; - } - - /** - * Sets planInfo - * - * @param \SendinBlue\Client\Model\SubAccountDetailsResponsePlanInfo $planInfo planInfo - * - * @return $this - */ - public function setPlanInfo($planInfo) - { - $this->container['planInfo'] = $planInfo; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/SubAccountDetailsResponsePlanInfo.php b/lib/Model/SubAccountDetailsResponsePlanInfo.php deleted file mode 100644 index dd0a3426..00000000 --- a/lib/Model/SubAccountDetailsResponsePlanInfo.php +++ /dev/null @@ -1,362 +0,0 @@ - '\SendinBlue\Client\Model\SubAccountDetailsResponsePlanInfoCredits', - 'features' => '\SendinBlue\Client\Model\SubAccountDetailsResponsePlanInfoFeatures', - 'planType' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'credits' => null, - 'features' => null, - 'planType' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'credits' => 'credits', - 'features' => 'features', - 'planType' => 'planType' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'credits' => 'setCredits', - 'features' => 'setFeatures', - 'planType' => 'setPlanType' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'credits' => 'getCredits', - 'features' => 'getFeatures', - 'planType' => 'getPlanType' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['credits'] = isset($data['credits']) ? $data['credits'] : null; - $this->container['features'] = isset($data['features']) ? $data['features'] : null; - $this->container['planType'] = isset($data['planType']) ? $data['planType'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets credits - * - * @return \SendinBlue\Client\Model\SubAccountDetailsResponsePlanInfoCredits - */ - public function getCredits() - { - return $this->container['credits']; - } - - /** - * Sets credits - * - * @param \SendinBlue\Client\Model\SubAccountDetailsResponsePlanInfoCredits $credits credits - * - * @return $this - */ - public function setCredits($credits) - { - $this->container['credits'] = $credits; - - return $this; - } - - /** - * Gets features - * - * @return \SendinBlue\Client\Model\SubAccountDetailsResponsePlanInfoFeatures - */ - public function getFeatures() - { - return $this->container['features']; - } - - /** - * Sets features - * - * @param \SendinBlue\Client\Model\SubAccountDetailsResponsePlanInfoFeatures $features features - * - * @return $this - */ - public function setFeatures($features) - { - $this->container['features'] = $features; - - return $this; - } - - /** - * Gets planType - * - * @return string - */ - public function getPlanType() - { - return $this->container['planType']; - } - - /** - * Sets planType - * - * @param string $planType type of the plan - * - * @return $this - */ - public function setPlanType($planType) - { - $this->container['planType'] = $planType; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/SubAccountDetailsResponsePlanInfoCredits.php b/lib/Model/SubAccountDetailsResponsePlanInfoCredits.php deleted file mode 100644 index abbec472..00000000 --- a/lib/Model/SubAccountDetailsResponsePlanInfoCredits.php +++ /dev/null @@ -1,332 +0,0 @@ - 'int', - 'emails' => '\SendinBlue\Client\Model\SubAccountDetailsResponsePlanInfoCreditsEmails' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'sms' => 'int64', - 'emails' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'sms' => 'sms', - 'emails' => 'emails' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'sms' => 'setSms', - 'emails' => 'setEmails' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'sms' => 'getSms', - 'emails' => 'getEmails' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['sms'] = isset($data['sms']) ? $data['sms'] : null; - $this->container['emails'] = isset($data['emails']) ? $data['emails'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets sms - * - * @return int - */ - public function getSms() - { - return $this->container['sms']; - } - - /** - * Sets sms - * - * @param int $sms SMS credits remaining on the sub-account - * - * @return $this - */ - public function setSms($sms) - { - $this->container['sms'] = $sms; - - return $this; - } - - /** - * Gets emails - * - * @return \SendinBlue\Client\Model\SubAccountDetailsResponsePlanInfoCreditsEmails - */ - public function getEmails() - { - return $this->container['emails']; - } - - /** - * Sets emails - * - * @param \SendinBlue\Client\Model\SubAccountDetailsResponsePlanInfoCreditsEmails $emails emails - * - * @return $this - */ - public function setEmails($emails) - { - $this->container['emails'] = $emails; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/SubAccountDetailsResponsePlanInfoCreditsEmails.php b/lib/Model/SubAccountDetailsResponsePlanInfoCreditsEmails.php deleted file mode 100644 index b9739aac..00000000 --- a/lib/Model/SubAccountDetailsResponsePlanInfoCreditsEmails.php +++ /dev/null @@ -1,332 +0,0 @@ - 'int', - 'remaining' => 'int' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'quantity' => 'int64', - 'remaining' => 'int64' - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'quantity' => 'quantity', - 'remaining' => 'remaining' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'quantity' => 'setQuantity', - 'remaining' => 'setRemaining' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'quantity' => 'getQuantity', - 'remaining' => 'getRemaining' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['quantity'] = isset($data['quantity']) ? $data['quantity'] : null; - $this->container['remaining'] = isset($data['remaining']) ? $data['remaining'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets quantity - * - * @return int - */ - public function getQuantity() - { - return $this->container['quantity']; - } - - /** - * Sets quantity - * - * @param int $quantity Quantity of email messaging limits provided - * - * @return $this - */ - public function setQuantity($quantity) - { - $this->container['quantity'] = $quantity; - - return $this; - } - - /** - * Gets remaining - * - * @return int - */ - public function getRemaining() - { - return $this->container['remaining']; - } - - /** - * Sets remaining - * - * @param int $remaining Available email messaging limits for use - * - * @return $this - */ - public function setRemaining($remaining) - { - $this->container['remaining'] = $remaining; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/SubAccountDetailsResponsePlanInfoFeatures.php b/lib/Model/SubAccountDetailsResponsePlanInfoFeatures.php deleted file mode 100644 index 5c2758a0..00000000 --- a/lib/Model/SubAccountDetailsResponsePlanInfoFeatures.php +++ /dev/null @@ -1,362 +0,0 @@ - '\SendinBlue\Client\Model\SubAccountDetailsResponsePlanInfoFeaturesInbox', - 'landingPage' => '\SendinBlue\Client\Model\SubAccountDetailsResponsePlanInfoFeaturesLandingPage', - 'users' => '\SendinBlue\Client\Model\SubAccountDetailsResponsePlanInfoFeaturesUsers' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'inbox' => null, - 'landingPage' => null, - 'users' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'inbox' => 'inbox', - 'landingPage' => 'landingPage', - 'users' => 'users' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'inbox' => 'setInbox', - 'landingPage' => 'setLandingPage', - 'users' => 'setUsers' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'inbox' => 'getInbox', - 'landingPage' => 'getLandingPage', - 'users' => 'getUsers' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['inbox'] = isset($data['inbox']) ? $data['inbox'] : null; - $this->container['landingPage'] = isset($data['landingPage']) ? $data['landingPage'] : null; - $this->container['users'] = isset($data['users']) ? $data['users'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets inbox - * - * @return \SendinBlue\Client\Model\SubAccountDetailsResponsePlanInfoFeaturesInbox - */ - public function getInbox() - { - return $this->container['inbox']; - } - - /** - * Sets inbox - * - * @param \SendinBlue\Client\Model\SubAccountDetailsResponsePlanInfoFeaturesInbox $inbox inbox - * - * @return $this - */ - public function setInbox($inbox) - { - $this->container['inbox'] = $inbox; - - return $this; - } - - /** - * Gets landingPage - * - * @return \SendinBlue\Client\Model\SubAccountDetailsResponsePlanInfoFeaturesLandingPage - */ - public function getLandingPage() - { - return $this->container['landingPage']; - } - - /** - * Sets landingPage - * - * @param \SendinBlue\Client\Model\SubAccountDetailsResponsePlanInfoFeaturesLandingPage $landingPage landingPage - * - * @return $this - */ - public function setLandingPage($landingPage) - { - $this->container['landingPage'] = $landingPage; - - return $this; - } - - /** - * Gets users - * - * @return \SendinBlue\Client\Model\SubAccountDetailsResponsePlanInfoFeaturesUsers - */ - public function getUsers() - { - return $this->container['users']; - } - - /** - * Sets users - * - * @param \SendinBlue\Client\Model\SubAccountDetailsResponsePlanInfoFeaturesUsers $users users - * - * @return $this - */ - public function setUsers($users) - { - $this->container['users'] = $users; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/SubAccountDetailsResponsePlanInfoFeaturesInbox.php b/lib/Model/SubAccountDetailsResponsePlanInfoFeaturesInbox.php deleted file mode 100644 index ede609d8..00000000 --- a/lib/Model/SubAccountDetailsResponsePlanInfoFeaturesInbox.php +++ /dev/null @@ -1,332 +0,0 @@ - 'int', - 'remaining' => 'int' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'quantity' => 'int64', - 'remaining' => 'int64' - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'quantity' => 'quantity', - 'remaining' => 'remaining' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'quantity' => 'setQuantity', - 'remaining' => 'setRemaining' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'quantity' => 'getQuantity', - 'remaining' => 'getRemaining' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['quantity'] = isset($data['quantity']) ? $data['quantity'] : null; - $this->container['remaining'] = isset($data['remaining']) ? $data['remaining'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets quantity - * - * @return int - */ - public function getQuantity() - { - return $this->container['quantity']; - } - - /** - * Sets quantity - * - * @param int $quantity Quantity of inbox provided - * - * @return $this - */ - public function setQuantity($quantity) - { - $this->container['quantity'] = $quantity; - - return $this; - } - - /** - * Gets remaining - * - * @return int - */ - public function getRemaining() - { - return $this->container['remaining']; - } - - /** - * Sets remaining - * - * @param int $remaining Available inboxes for use - * - * @return $this - */ - public function setRemaining($remaining) - { - $this->container['remaining'] = $remaining; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/SubAccountDetailsResponsePlanInfoFeaturesLandingPage.php b/lib/Model/SubAccountDetailsResponsePlanInfoFeaturesLandingPage.php deleted file mode 100644 index 46af3332..00000000 --- a/lib/Model/SubAccountDetailsResponsePlanInfoFeaturesLandingPage.php +++ /dev/null @@ -1,332 +0,0 @@ - 'int', - 'remaining' => 'int' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'quantity' => 'int64', - 'remaining' => 'int64' - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'quantity' => 'quantity', - 'remaining' => 'remaining' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'quantity' => 'setQuantity', - 'remaining' => 'setRemaining' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'quantity' => 'getQuantity', - 'remaining' => 'getRemaining' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['quantity'] = isset($data['quantity']) ? $data['quantity'] : null; - $this->container['remaining'] = isset($data['remaining']) ? $data['remaining'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets quantity - * - * @return int - */ - public function getQuantity() - { - return $this->container['quantity']; - } - - /** - * Sets quantity - * - * @param int $quantity Quantity of landing pages provided - * - * @return $this - */ - public function setQuantity($quantity) - { - $this->container['quantity'] = $quantity; - - return $this; - } - - /** - * Gets remaining - * - * @return int - */ - public function getRemaining() - { - return $this->container['remaining']; - } - - /** - * Sets remaining - * - * @param int $remaining Available landing pages for use - * - * @return $this - */ - public function setRemaining($remaining) - { - $this->container['remaining'] = $remaining; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/SubAccountDetailsResponsePlanInfoFeaturesUsers.php b/lib/Model/SubAccountDetailsResponsePlanInfoFeaturesUsers.php deleted file mode 100644 index 7c1100d8..00000000 --- a/lib/Model/SubAccountDetailsResponsePlanInfoFeaturesUsers.php +++ /dev/null @@ -1,332 +0,0 @@ - 'int', - 'remaining' => 'int' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'quantity' => 'int64', - 'remaining' => 'int64' - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'quantity' => 'quantity', - 'remaining' => 'remaining' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'quantity' => 'setQuantity', - 'remaining' => 'setRemaining' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'quantity' => 'getQuantity', - 'remaining' => 'getRemaining' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['quantity'] = isset($data['quantity']) ? $data['quantity'] : null; - $this->container['remaining'] = isset($data['remaining']) ? $data['remaining'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets quantity - * - * @return int - */ - public function getQuantity() - { - return $this->container['quantity']; - } - - /** - * Sets quantity - * - * @param int $quantity Quantity of multi-account's provided - * - * @return $this - */ - public function setQuantity($quantity) - { - $this->container['quantity'] = $quantity; - - return $this; - } - - /** - * Gets remaining - * - * @return int - */ - public function getRemaining() - { - return $this->container['remaining']; - } - - /** - * Sets remaining - * - * @param int $remaining Available multi-accounts for use - * - * @return $this - */ - public function setRemaining($remaining) - { - $this->container['remaining'] = $remaining; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/SubAccountUpdatePlanRequest.php b/lib/Model/SubAccountUpdatePlanRequest.php deleted file mode 100644 index 6472a9b2..00000000 --- a/lib/Model/SubAccountUpdatePlanRequest.php +++ /dev/null @@ -1,332 +0,0 @@ - '\SendinBlue\Client\Model\SubAccountUpdatePlanRequestCredits', - 'features' => '\SendinBlue\Client\Model\SubAccountUpdatePlanRequestFeatures' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'credits' => null, - 'features' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'credits' => 'credits', - 'features' => 'features' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'credits' => 'setCredits', - 'features' => 'setFeatures' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'credits' => 'getCredits', - 'features' => 'getFeatures' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['credits'] = isset($data['credits']) ? $data['credits'] : null; - $this->container['features'] = isset($data['features']) ? $data['features'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets credits - * - * @return \SendinBlue\Client\Model\SubAccountUpdatePlanRequestCredits - */ - public function getCredits() - { - return $this->container['credits']; - } - - /** - * Sets credits - * - * @param \SendinBlue\Client\Model\SubAccountUpdatePlanRequestCredits $credits credits - * - * @return $this - */ - public function setCredits($credits) - { - $this->container['credits'] = $credits; - - return $this; - } - - /** - * Gets features - * - * @return \SendinBlue\Client\Model\SubAccountUpdatePlanRequestFeatures - */ - public function getFeatures() - { - return $this->container['features']; - } - - /** - * Sets features - * - * @param \SendinBlue\Client\Model\SubAccountUpdatePlanRequestFeatures $features features - * - * @return $this - */ - public function setFeatures($features) - { - $this->container['features'] = $features; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/SubAccountUpdatePlanRequestCredits.php b/lib/Model/SubAccountUpdatePlanRequestCredits.php deleted file mode 100644 index 4f8a3f40..00000000 --- a/lib/Model/SubAccountUpdatePlanRequestCredits.php +++ /dev/null @@ -1,302 +0,0 @@ - 'int' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'email' => 'int64' - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'email' => 'email' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'email' => 'setEmail' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'email' => 'getEmail' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['email'] = isset($data['email']) ? $data['email'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets email - * - * @return int - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param int $email Number of email credits - * - * @return $this - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/SubAccountUpdatePlanRequestFeatures.php b/lib/Model/SubAccountUpdatePlanRequestFeatures.php deleted file mode 100644 index 7c036412..00000000 --- a/lib/Model/SubAccountUpdatePlanRequestFeatures.php +++ /dev/null @@ -1,362 +0,0 @@ - 'int', - 'landingPage' => 'int', - 'inbox' => 'int' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'users' => 'int64', - 'landingPage' => 'int64', - 'inbox' => 'int64' - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'users' => 'users', - 'landingPage' => 'landingPage', - 'inbox' => 'inbox' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'users' => 'setUsers', - 'landingPage' => 'setLandingPage', - 'inbox' => 'setInbox' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'users' => 'getUsers', - 'landingPage' => 'getLandingPage', - 'inbox' => 'getInbox' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['users'] = isset($data['users']) ? $data['users'] : null; - $this->container['landingPage'] = isset($data['landingPage']) ? $data['landingPage'] : null; - $this->container['inbox'] = isset($data['inbox']) ? $data['inbox'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets users - * - * @return int - */ - public function getUsers() - { - return $this->container['users']; - } - - /** - * Sets users - * - * @param int $users Number of multi-users - * - * @return $this - */ - public function setUsers($users) - { - $this->container['users'] = $users; - - return $this; - } - - /** - * Gets landingPage - * - * @return int - */ - public function getLandingPage() - { - return $this->container['landingPage']; - } - - /** - * Sets landingPage - * - * @param int $landingPage Number of landing pages - * - * @return $this - */ - public function setLandingPage($landingPage) - { - $this->container['landingPage'] = $landingPage; - - return $this; - } - - /** - * Gets inbox - * - * @return int - */ - public function getInbox() - { - return $this->container['inbox']; - } - - /** - * Sets inbox - * - * @param int $inbox Number of inboxes - * - * @return $this - */ - public function setInbox($inbox) - { - $this->container['inbox'] = $inbox; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/SubAccountsResponse.php b/lib/Model/SubAccountsResponse.php deleted file mode 100644 index d7f5e6c1..00000000 --- a/lib/Model/SubAccountsResponse.php +++ /dev/null @@ -1,331 +0,0 @@ - 'int', - 'subAccounts' => '\SendinBlue\Client\Model\SubAccountsResponseSubAccounts[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'count' => null, - 'subAccounts' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'count' => 'count', - 'subAccounts' => 'subAccounts' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'count' => 'setCount', - 'subAccounts' => 'setSubAccounts' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'count' => 'getCount', - 'subAccounts' => 'getSubAccounts' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['count'] = isset($data['count']) ? $data['count'] : null; - $this->container['subAccounts'] = isset($data['subAccounts']) ? $data['subAccounts'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets count - * - * @return int - */ - public function getCount() - { - return $this->container['count']; - } - - /** - * Sets count - * - * @param int $count Total number of subaccounts - * - * @return $this - */ - public function setCount($count) - { - $this->container['count'] = $count; - - return $this; - } - - /** - * Gets subAccounts - * - * @return \SendinBlue\Client\Model\SubAccountsResponseSubAccounts[] - */ - public function getSubAccounts() - { - return $this->container['subAccounts']; - } - - /** - * Sets subAccounts - * - * @param \SendinBlue\Client\Model\SubAccountsResponseSubAccounts[] $subAccounts subAccounts - * - * @return $this - */ - public function setSubAccounts($subAccounts) - { - $this->container['subAccounts'] = $subAccounts; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/SubAccountsResponseSubAccounts.php b/lib/Model/SubAccountsResponseSubAccounts.php deleted file mode 100644 index 4ac8b9a2..00000000 --- a/lib/Model/SubAccountsResponseSubAccounts.php +++ /dev/null @@ -1,403 +0,0 @@ - 'int', - 'companyName' => 'string', - 'active' => 'bool', - 'createdAt' => 'int' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'id' => 'int64', - 'companyName' => null, - 'active' => null, - 'createdAt' => 'int64' - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'id' => 'id', - 'companyName' => 'companyName', - 'active' => 'active', - 'createdAt' => 'createdAt' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'id' => 'setId', - 'companyName' => 'setCompanyName', - 'active' => 'setActive', - 'createdAt' => 'setCreatedAt' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'id' => 'getId', - 'companyName' => 'getCompanyName', - 'active' => 'getActive', - 'createdAt' => 'getCreatedAt' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['id'] = isset($data['id']) ? $data['id'] : null; - $this->container['companyName'] = isset($data['companyName']) ? $data['companyName'] : null; - $this->container['active'] = isset($data['active']) ? $data['active'] : null; - $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } - if ($this->container['companyName'] === null) { - $invalidProperties[] = "'companyName' can't be null"; - } - if ($this->container['active'] === null) { - $invalidProperties[] = "'active' can't be null"; - } - if ($this->container['createdAt'] === null) { - $invalidProperties[] = "'createdAt' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets id - * - * @return int - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param int $id id of the sub-account - * - * @return $this - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets companyName - * - * @return string - */ - public function getCompanyName() - { - return $this->container['companyName']; - } - - /** - * Sets companyName - * - * @param string $companyName Name of the sub-account company - * - * @return $this - */ - public function setCompanyName($companyName) - { - $this->container['companyName'] = $companyName; - - return $this; - } - - /** - * Gets active - * - * @return bool - */ - public function getActive() - { - return $this->container['active']; - } - - /** - * Sets active - * - * @param bool $active Whether the sub-account is active or not - * - * @return $this - */ - public function setActive($active) - { - $this->container['active'] = $active; - - return $this; - } - - /** - * Gets createdAt - * - * @return int - */ - public function getCreatedAt() - { - return $this->container['createdAt']; - } - - /** - * Sets createdAt - * - * @param int $createdAt Timestamp when the sub-account was created - * - * @return $this - */ - public function setCreatedAt($createdAt) - { - $this->container['createdAt'] = $createdAt; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/Task.php b/lib/Model/Task.php deleted file mode 100644 index 292d6e5f..00000000 --- a/lib/Model/Task.php +++ /dev/null @@ -1,458 +0,0 @@ - 'string', - 'taskTypeId' => 'string', - 'name' => 'string', - 'contactsIds' => 'int[]', - 'dealsIds' => 'string[]', - 'companiesIds' => 'string[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'id' => null, - 'taskTypeId' => null, - 'name' => null, - 'contactsIds' => null, - 'dealsIds' => null, - 'companiesIds' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'id' => 'id', - 'taskTypeId' => 'taskTypeId', - 'name' => 'name', - 'contactsIds' => 'contactsIds', - 'dealsIds' => 'dealsIds', - 'companiesIds' => 'companiesIds' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'id' => 'setId', - 'taskTypeId' => 'setTaskTypeId', - 'name' => 'setName', - 'contactsIds' => 'setContactsIds', - 'dealsIds' => 'setDealsIds', - 'companiesIds' => 'setCompaniesIds' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'id' => 'getId', - 'taskTypeId' => 'getTaskTypeId', - 'name' => 'getName', - 'contactsIds' => 'getContactsIds', - 'dealsIds' => 'getDealsIds', - 'companiesIds' => 'getCompaniesIds' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['id'] = isset($data['id']) ? $data['id'] : null; - $this->container['taskTypeId'] = isset($data['taskTypeId']) ? $data['taskTypeId'] : null; - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - $this->container['contactsIds'] = isset($data['contactsIds']) ? $data['contactsIds'] : null; - $this->container['dealsIds'] = isset($data['dealsIds']) ? $data['dealsIds'] : null; - $this->container['companiesIds'] = isset($data['companiesIds']) ? $data['companiesIds'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['taskTypeId'] === null) { - $invalidProperties[] = "'taskTypeId' can't be null"; - } - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets id - * - * @return string - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string $id Unique task id - * - * @return $this - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets taskTypeId - * - * @return string - */ - public function getTaskTypeId() - { - return $this->container['taskTypeId']; - } - - /** - * Sets taskTypeId - * - * @param string $taskTypeId Id for type of task e.g Call / Email / Meeting etc. - * - * @return $this - */ - public function setTaskTypeId($taskTypeId) - { - $this->container['taskTypeId'] = $taskTypeId; - - return $this; - } - - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name Name of task - * - * @return $this - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets contactsIds - * - * @return int[] - */ - public function getContactsIds() - { - return $this->container['contactsIds']; - } - - /** - * Sets contactsIds - * - * @param int[] $contactsIds Contact ids for contacts linked to this task - * - * @return $this - */ - public function setContactsIds($contactsIds) - { - $this->container['contactsIds'] = $contactsIds; - - return $this; - } - - /** - * Gets dealsIds - * - * @return string[] - */ - public function getDealsIds() - { - return $this->container['dealsIds']; - } - - /** - * Sets dealsIds - * - * @param string[] $dealsIds Deal ids for deals a task is linked to - * - * @return $this - */ - public function setDealsIds($dealsIds) - { - $this->container['dealsIds'] = $dealsIds; - - return $this; - } - - /** - * Gets companiesIds - * - * @return string[] - */ - public function getCompaniesIds() - { - return $this->container['companiesIds']; - } - - /** - * Sets companiesIds - * - * @param string[] $companiesIds Companies ids for companies a task is linked to - * - * @return $this - */ - public function setCompaniesIds($companiesIds) - { - $this->container['companiesIds'] = $companiesIds; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/TaskList.php b/lib/Model/TaskList.php deleted file mode 100644 index 21888270..00000000 --- a/lib/Model/TaskList.php +++ /dev/null @@ -1,302 +0,0 @@ - '\SendinBlue\Client\Model\Task[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'items' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'items' => 'items' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'items' => 'setItems' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'items' => 'getItems' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['items'] = isset($data['items']) ? $data['items'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets items - * - * @return \SendinBlue\Client\Model\Task[] - */ - public function getItems() - { - return $this->container['items']; - } - - /** - * Sets items - * - * @param \SendinBlue\Client\Model\Task[] $items List of tasks - * - * @return $this - */ - public function setItems($items) - { - $this->container['items'] = $items; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/TaskReminder.php b/lib/Model/TaskReminder.php deleted file mode 100644 index 228bf0e1..00000000 --- a/lib/Model/TaskReminder.php +++ /dev/null @@ -1,407 +0,0 @@ - 'int', - 'unit' => 'string', - 'types' => 'string[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'value' => null, - 'unit' => null, - 'types' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'value' => 'value', - 'unit' => 'unit', - 'types' => 'types' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'value' => 'setValue', - 'unit' => 'setUnit', - 'types' => 'setTypes' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'value' => 'getValue', - 'unit' => 'getUnit', - 'types' => 'getTypes' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - const UNIT_MINUTES = 'minutes'; - const UNIT_HOURS = 'hours'; - const UNIT_WEEKS = 'weeks'; - const UNIT_DAYS = 'days'; - - - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getUnitAllowableValues() - { - return [ - self::UNIT_MINUTES, - self::UNIT_HOURS, - self::UNIT_WEEKS, - self::UNIT_DAYS, - ]; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['value'] = isset($data['value']) ? $data['value'] : null; - $this->container['unit'] = isset($data['unit']) ? $data['unit'] : null; - $this->container['types'] = isset($data['types']) ? $data['types'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['value'] === null) { - $invalidProperties[] = "'value' can't be null"; - } - if ($this->container['unit'] === null) { - $invalidProperties[] = "'unit' can't be null"; - } - $allowedValues = $this->getUnitAllowableValues(); - if (!is_null($this->container['unit']) && !in_array($this->container['unit'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value for 'unit', must be one of '%s'", - implode("', '", $allowedValues) - ); - } - - if ($this->container['types'] === null) { - $invalidProperties[] = "'types' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets value - * - * @return int - */ - public function getValue() - { - return $this->container['value']; - } - - /** - * Sets value - * - * @param int $value Value of time unit before reminder is to be sent - * - * @return $this - */ - public function setValue($value) - { - $this->container['value'] = $value; - - return $this; - } - - /** - * Gets unit - * - * @return string - */ - public function getUnit() - { - return $this->container['unit']; - } - - /** - * Sets unit - * - * @param string $unit Unit of time before reminder is to be sent - * - * @return $this - */ - public function setUnit($unit) - { - $allowedValues = $this->getUnitAllowableValues(); - if (!in_array($unit, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value for 'unit', must be one of '%s'", - implode("', '", $allowedValues) - ) - ); - } - $this->container['unit'] = $unit; - - return $this; - } - - /** - * Gets types - * - * @return string[] - */ - public function getTypes() - { - return $this->container['types']; - } - - /** - * Sets types - * - * @param string[] $types Type of task reminder e.g email, push - * - * @return $this - */ - public function setTypes($types) - { - $this->container['types'] = $types; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/TaskTypes.php b/lib/Model/TaskTypes.php deleted file mode 100644 index 468e2298..00000000 --- a/lib/Model/TaskTypes.php +++ /dev/null @@ -1,332 +0,0 @@ - 'string', - 'title' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'id' => null, - 'title' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'id' => 'id', - 'title' => 'title' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'id' => 'setId', - 'title' => 'setTitle' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'id' => 'getId', - 'title' => 'getTitle' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['id'] = isset($data['id']) ? $data['id'] : null; - $this->container['title'] = isset($data['title']) ? $data['title'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets id - * - * @return string - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string $id Id of task type - * - * @return $this - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets title - * - * @return string - */ - public function getTitle() - { - return $this->container['title']; - } - - /** - * Sets title - * - * @param string $title Title of task type - * - * @return $this - */ - public function setTitle($title) - { - $this->container['title'] = $title; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/UpdateAttribute.php b/lib/Model/UpdateAttribute.php index ee1ba6cd..25247c46 100644 --- a/lib/Model/UpdateAttribute.php +++ b/lib/Model/UpdateAttribute.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -264,6 +264,7 @@ public function setEnumeration($enumeration) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -276,6 +277,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -289,6 +291,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -305,6 +308,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/UpdateAttributeEnumeration.php b/lib/Model/UpdateAttributeEnumeration.php index b8f5b9fa..04c0754d 100644 --- a/lib/Model/UpdateAttributeEnumeration.php +++ b/lib/Model/UpdateAttributeEnumeration.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -270,6 +270,7 @@ public function setLabel($label) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -282,6 +283,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -295,6 +297,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -311,6 +314,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/UpdateBatchContacts.php b/lib/Model/UpdateBatchContacts.php deleted file mode 100644 index bd4d7baf..00000000 --- a/lib/Model/UpdateBatchContacts.php +++ /dev/null @@ -1,301 +0,0 @@ - '\SendinBlue\Client\Model\UpdateBatchContactsContacts[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'contacts' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'contacts' => 'contacts' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'contacts' => 'setContacts' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'contacts' => 'getContacts' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['contacts'] = isset($data['contacts']) ? $data['contacts'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets contacts - * - * @return \SendinBlue\Client\Model\UpdateBatchContactsContacts[] - */ - public function getContacts() - { - return $this->container['contacts']; - } - - /** - * Sets contacts - * - * @param \SendinBlue\Client\Model\UpdateBatchContactsContacts[] $contacts List of contacts to be updated - * - * @return $this - */ - public function setContacts($contacts) - { - $this->container['contacts'] = $contacts; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/UpdateBatchContactsModel.php b/lib/Model/UpdateBatchContactsModel.php deleted file mode 100644 index af80774c..00000000 --- a/lib/Model/UpdateBatchContactsModel.php +++ /dev/null @@ -1,331 +0,0 @@ - 'int[]', - 'failureIds' => 'int[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'successIds' => 'int64', - 'failureIds' => 'int64' - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'successIds' => 'successIds', - 'failureIds' => 'failureIds' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'successIds' => 'setSuccessIds', - 'failureIds' => 'setFailureIds' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'successIds' => 'getSuccessIds', - 'failureIds' => 'getFailureIds' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['successIds'] = isset($data['successIds']) ? $data['successIds'] : null; - $this->container['failureIds'] = isset($data['failureIds']) ? $data['failureIds'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets successIds - * - * @return int[] - */ - public function getSuccessIds() - { - return $this->container['successIds']; - } - - /** - * Sets successIds - * - * @param int[] $successIds successIds - * - * @return $this - */ - public function setSuccessIds($successIds) - { - $this->container['successIds'] = $successIds; - - return $this; - } - - /** - * Gets failureIds - * - * @return int[] - */ - public function getFailureIds() - { - return $this->container['failureIds']; - } - - /** - * Sets failureIds - * - * @param int[] $failureIds failureIds - * - * @return $this - */ - public function setFailureIds($failureIds) - { - $this->container['failureIds'] = $failureIds; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/UpdateCampaignStatus.php b/lib/Model/UpdateCampaignStatus.php index c02917ca..c0cc8714 100644 --- a/lib/Model/UpdateCampaignStatus.php +++ b/lib/Model/UpdateCampaignStatus.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -279,6 +279,7 @@ public function setStatus($status) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -291,6 +292,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -304,6 +306,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -320,6 +323,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/UpdateChild.php b/lib/Model/UpdateChild.php index 37263c17..2592ca35 100644 --- a/lib/Model/UpdateChild.php +++ b/lib/Model/UpdateChild.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -58,9 +58,9 @@ class UpdateChild implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'email' => 'string', - 'firstName' => 'string', - 'lastName' => 'string', - 'companyName' => 'string', + 'first_name' => 'string', + 'last_name' => 'string', + 'company_name' => 'string', 'password' => 'string' ]; @@ -71,9 +71,9 @@ class UpdateChild implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'email' => 'email', - 'firstName' => null, - 'lastName' => null, - 'companyName' => null, + 'first_name' => null, + 'last_name' => null, + 'company_name' => null, 'password' => 'password' ]; @@ -105,9 +105,9 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'email' => 'email', - 'firstName' => 'firstName', - 'lastName' => 'lastName', - 'companyName' => 'companyName', + 'first_name' => 'firstName', + 'last_name' => 'lastName', + 'company_name' => 'companyName', 'password' => 'password' ]; @@ -118,9 +118,9 @@ public static function swaggerFormats() */ protected static $setters = [ 'email' => 'setEmail', - 'firstName' => 'setFirstName', - 'lastName' => 'setLastName', - 'companyName' => 'setCompanyName', + 'first_name' => 'setFirstName', + 'last_name' => 'setLastName', + 'company_name' => 'setCompanyName', 'password' => 'setPassword' ]; @@ -131,9 +131,9 @@ public static function swaggerFormats() */ protected static $getters = [ 'email' => 'getEmail', - 'firstName' => 'getFirstName', - 'lastName' => 'getLastName', - 'companyName' => 'getCompanyName', + 'first_name' => 'getFirstName', + 'last_name' => 'getLastName', + 'company_name' => 'getCompanyName', 'password' => 'getPassword' ]; @@ -198,9 +198,9 @@ public function getModelName() public function __construct(array $data = null) { $this->container['email'] = isset($data['email']) ? $data['email'] : null; - $this->container['firstName'] = isset($data['firstName']) ? $data['firstName'] : null; - $this->container['lastName'] = isset($data['lastName']) ? $data['lastName'] : null; - $this->container['companyName'] = isset($data['companyName']) ? $data['companyName'] : null; + $this->container['first_name'] = isset($data['first_name']) ? $data['first_name'] : null; + $this->container['last_name'] = isset($data['last_name']) ? $data['last_name'] : null; + $this->container['company_name'] = isset($data['company_name']) ? $data['company_name'] : null; $this->container['password'] = isset($data['password']) ? $data['password'] : null; } @@ -253,73 +253,73 @@ public function setEmail($email) } /** - * Gets firstName + * Gets first_name * * @return string */ public function getFirstName() { - return $this->container['firstName']; + return $this->container['first_name']; } /** - * Sets firstName + * Sets first_name * - * @param string $firstName New First name to use to update the child account + * @param string $first_name New First name to use to update the child account * * @return $this */ - public function setFirstName($firstName) + public function setFirstName($first_name) { - $this->container['firstName'] = $firstName; + $this->container['first_name'] = $first_name; return $this; } /** - * Gets lastName + * Gets last_name * * @return string */ public function getLastName() { - return $this->container['lastName']; + return $this->container['last_name']; } /** - * Sets lastName + * Sets last_name * - * @param string $lastName New Last name to use to update the child account + * @param string $last_name New Last name to use to update the child account * * @return $this */ - public function setLastName($lastName) + public function setLastName($last_name) { - $this->container['lastName'] = $lastName; + $this->container['last_name'] = $last_name; return $this; } /** - * Gets companyName + * Gets company_name * * @return string */ public function getCompanyName() { - return $this->container['companyName']; + return $this->container['company_name']; } /** - * Sets companyName + * Sets company_name * - * @param string $companyName New Company name to use to update the child account + * @param string $company_name New Company name to use to update the child account * * @return $this */ - public function setCompanyName($companyName) + public function setCompanyName($company_name) { - $this->container['companyName'] = $companyName; + $this->container['company_name'] = $company_name; return $this; } @@ -354,6 +354,7 @@ public function setPassword($password) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -366,6 +367,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -379,6 +381,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -395,6 +398,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/UpdateChildAccountStatus.php b/lib/Model/UpdateChildAccountStatus.php index 733c9418..a329163f 100644 --- a/lib/Model/UpdateChildAccountStatus.php +++ b/lib/Model/UpdateChildAccountStatus.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -57,10 +57,10 @@ class UpdateChildAccountStatus implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'transactionalEmail' => 'bool', - 'transactionalSms' => 'bool', - 'marketingAutomation' => 'bool', - 'smsCampaign' => 'bool' + 'transactional_email' => 'bool', + 'transactional_sms' => 'bool', + 'marketing_automation' => 'bool', + 'sms_campaign' => 'bool' ]; /** @@ -69,10 +69,10 @@ class UpdateChildAccountStatus implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'transactionalEmail' => null, - 'transactionalSms' => null, - 'marketingAutomation' => null, - 'smsCampaign' => null + 'transactional_email' => null, + 'transactional_sms' => null, + 'marketing_automation' => null, + 'sms_campaign' => null ]; /** @@ -102,10 +102,10 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'transactionalEmail' => 'transactionalEmail', - 'transactionalSms' => 'transactionalSms', - 'marketingAutomation' => 'marketingAutomation', - 'smsCampaign' => 'smsCampaign' + 'transactional_email' => 'transactionalEmail', + 'transactional_sms' => 'transactionalSms', + 'marketing_automation' => 'marketingAutomation', + 'sms_campaign' => 'smsCampaign' ]; /** @@ -114,10 +114,10 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'transactionalEmail' => 'setTransactionalEmail', - 'transactionalSms' => 'setTransactionalSms', - 'marketingAutomation' => 'setMarketingAutomation', - 'smsCampaign' => 'setSmsCampaign' + 'transactional_email' => 'setTransactionalEmail', + 'transactional_sms' => 'setTransactionalSms', + 'marketing_automation' => 'setMarketingAutomation', + 'sms_campaign' => 'setSmsCampaign' ]; /** @@ -126,10 +126,10 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'transactionalEmail' => 'getTransactionalEmail', - 'transactionalSms' => 'getTransactionalSms', - 'marketingAutomation' => 'getMarketingAutomation', - 'smsCampaign' => 'getSmsCampaign' + 'transactional_email' => 'getTransactionalEmail', + 'transactional_sms' => 'getTransactionalSms', + 'marketing_automation' => 'getMarketingAutomation', + 'sms_campaign' => 'getSmsCampaign' ]; /** @@ -192,10 +192,10 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['transactionalEmail'] = isset($data['transactionalEmail']) ? $data['transactionalEmail'] : null; - $this->container['transactionalSms'] = isset($data['transactionalSms']) ? $data['transactionalSms'] : null; - $this->container['marketingAutomation'] = isset($data['marketingAutomation']) ? $data['marketingAutomation'] : null; - $this->container['smsCampaign'] = isset($data['smsCampaign']) ? $data['smsCampaign'] : null; + $this->container['transactional_email'] = isset($data['transactional_email']) ? $data['transactional_email'] : null; + $this->container['transactional_sms'] = isset($data['transactional_sms']) ? $data['transactional_sms'] : null; + $this->container['marketing_automation'] = isset($data['marketing_automation']) ? $data['marketing_automation'] : null; + $this->container['sms_campaign'] = isset($data['sms_campaign']) ? $data['sms_campaign'] : null; } /** @@ -223,97 +223,97 @@ public function valid() /** - * Gets transactionalEmail + * Gets transactional_email * * @return bool */ public function getTransactionalEmail() { - return $this->container['transactionalEmail']; + return $this->container['transactional_email']; } /** - * Sets transactionalEmail + * Sets transactional_email * - * @param bool $transactionalEmail Status of Transactional Email Platform activation for your account (true=enabled, false=disabled) + * @param bool $transactional_email Status of Transactional Email Platform activation for your account (true=enabled, false=disabled) * * @return $this */ - public function setTransactionalEmail($transactionalEmail) + public function setTransactionalEmail($transactional_email) { - $this->container['transactionalEmail'] = $transactionalEmail; + $this->container['transactional_email'] = $transactional_email; return $this; } /** - * Gets transactionalSms + * Gets transactional_sms * * @return bool */ public function getTransactionalSms() { - return $this->container['transactionalSms']; + return $this->container['transactional_sms']; } /** - * Sets transactionalSms + * Sets transactional_sms * - * @param bool $transactionalSms Status of Transactional SMS Platform activation for your account (true=enabled, false=disabled) + * @param bool $transactional_sms Status of Transactional SMS Platform activation for your account (true=enabled, false=disabled) * * @return $this */ - public function setTransactionalSms($transactionalSms) + public function setTransactionalSms($transactional_sms) { - $this->container['transactionalSms'] = $transactionalSms; + $this->container['transactional_sms'] = $transactional_sms; return $this; } /** - * Gets marketingAutomation + * Gets marketing_automation * * @return bool */ public function getMarketingAutomation() { - return $this->container['marketingAutomation']; + return $this->container['marketing_automation']; } /** - * Sets marketingAutomation + * Sets marketing_automation * - * @param bool $marketingAutomation Status of Marketing Automation Platform activation for your account (true=enabled, false=disabled) + * @param bool $marketing_automation Status of Marketing Automation Platform activation for your account (true=enabled, false=disabled) * * @return $this */ - public function setMarketingAutomation($marketingAutomation) + public function setMarketingAutomation($marketing_automation) { - $this->container['marketingAutomation'] = $marketingAutomation; + $this->container['marketing_automation'] = $marketing_automation; return $this; } /** - * Gets smsCampaign + * Gets sms_campaign * * @return bool */ public function getSmsCampaign() { - return $this->container['smsCampaign']; + return $this->container['sms_campaign']; } /** - * Sets smsCampaign + * Sets sms_campaign * - * @param bool $smsCampaign Status of SMS Campaign Platform activation for your account (true=enabled, false=disabled) + * @param bool $sms_campaign Status of SMS Campaign Platform activation for your account (true=enabled, false=disabled) * * @return $this */ - public function setSmsCampaign($smsCampaign) + public function setSmsCampaign($sms_campaign) { - $this->container['smsCampaign'] = $smsCampaign; + $this->container['sms_campaign'] = $sms_campaign; return $this; } @@ -324,6 +324,7 @@ public function setSmsCampaign($smsCampaign) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -336,6 +337,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -349,6 +351,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -365,6 +368,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/UpdateChildDomain.php b/lib/Model/UpdateChildDomain.php index 22162ec7..b3dcad91 100644 --- a/lib/Model/UpdateChildDomain.php +++ b/lib/Model/UpdateChildDomain.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -234,6 +234,7 @@ public function setDomain($domain) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -246,6 +247,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -259,6 +261,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -275,6 +278,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/UpdateContact.php b/lib/Model/UpdateContact.php index dcbaf24a..1254020f 100644 --- a/lib/Model/UpdateContact.php +++ b/lib/Model/UpdateContact.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -58,11 +58,11 @@ class UpdateContact implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'attributes' => 'object', - 'emailBlacklisted' => 'bool', - 'smsBlacklisted' => 'bool', - 'listIds' => 'int[]', - 'unlinkListIds' => 'int[]', - 'smtpBlacklistSender' => 'string[]' + 'email_blacklisted' => 'bool', + 'sms_blacklisted' => 'bool', + 'list_ids' => 'int[]', + 'unlink_list_ids' => 'int[]', + 'smtp_blacklist_sender' => 'string[]' ]; /** @@ -72,11 +72,11 @@ class UpdateContact implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'attributes' => null, - 'emailBlacklisted' => null, - 'smsBlacklisted' => null, - 'listIds' => 'int64', - 'unlinkListIds' => 'int64', - 'smtpBlacklistSender' => 'email' + 'email_blacklisted' => null, + 'sms_blacklisted' => null, + 'list_ids' => 'int64', + 'unlink_list_ids' => 'int64', + 'smtp_blacklist_sender' => 'email' ]; /** @@ -107,11 +107,11 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'attributes' => 'attributes', - 'emailBlacklisted' => 'emailBlacklisted', - 'smsBlacklisted' => 'smsBlacklisted', - 'listIds' => 'listIds', - 'unlinkListIds' => 'unlinkListIds', - 'smtpBlacklistSender' => 'smtpBlacklistSender' + 'email_blacklisted' => 'emailBlacklisted', + 'sms_blacklisted' => 'smsBlacklisted', + 'list_ids' => 'listIds', + 'unlink_list_ids' => 'unlinkListIds', + 'smtp_blacklist_sender' => 'smtpBlacklistSender' ]; /** @@ -121,11 +121,11 @@ public static function swaggerFormats() */ protected static $setters = [ 'attributes' => 'setAttributes', - 'emailBlacklisted' => 'setEmailBlacklisted', - 'smsBlacklisted' => 'setSmsBlacklisted', - 'listIds' => 'setListIds', - 'unlinkListIds' => 'setUnlinkListIds', - 'smtpBlacklistSender' => 'setSmtpBlacklistSender' + 'email_blacklisted' => 'setEmailBlacklisted', + 'sms_blacklisted' => 'setSmsBlacklisted', + 'list_ids' => 'setListIds', + 'unlink_list_ids' => 'setUnlinkListIds', + 'smtp_blacklist_sender' => 'setSmtpBlacklistSender' ]; /** @@ -135,11 +135,11 @@ public static function swaggerFormats() */ protected static $getters = [ 'attributes' => 'getAttributes', - 'emailBlacklisted' => 'getEmailBlacklisted', - 'smsBlacklisted' => 'getSmsBlacklisted', - 'listIds' => 'getListIds', - 'unlinkListIds' => 'getUnlinkListIds', - 'smtpBlacklistSender' => 'getSmtpBlacklistSender' + 'email_blacklisted' => 'getEmailBlacklisted', + 'sms_blacklisted' => 'getSmsBlacklisted', + 'list_ids' => 'getListIds', + 'unlink_list_ids' => 'getUnlinkListIds', + 'smtp_blacklist_sender' => 'getSmtpBlacklistSender' ]; /** @@ -203,11 +203,11 @@ public function getModelName() public function __construct(array $data = null) { $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; - $this->container['emailBlacklisted'] = isset($data['emailBlacklisted']) ? $data['emailBlacklisted'] : null; - $this->container['smsBlacklisted'] = isset($data['smsBlacklisted']) ? $data['smsBlacklisted'] : null; - $this->container['listIds'] = isset($data['listIds']) ? $data['listIds'] : null; - $this->container['unlinkListIds'] = isset($data['unlinkListIds']) ? $data['unlinkListIds'] : null; - $this->container['smtpBlacklistSender'] = isset($data['smtpBlacklistSender']) ? $data['smtpBlacklistSender'] : null; + $this->container['email_blacklisted'] = isset($data['email_blacklisted']) ? $data['email_blacklisted'] : null; + $this->container['sms_blacklisted'] = isset($data['sms_blacklisted']) ? $data['sms_blacklisted'] : null; + $this->container['list_ids'] = isset($data['list_ids']) ? $data['list_ids'] : null; + $this->container['unlink_list_ids'] = isset($data['unlink_list_ids']) ? $data['unlink_list_ids'] : null; + $this->container['smtp_blacklist_sender'] = isset($data['smtp_blacklist_sender']) ? $data['smtp_blacklist_sender'] : null; } /** @@ -247,7 +247,7 @@ public function getAttributes() /** * Sets attributes * - * @param object $attributes Pass the set of attributes to be updated. These attributes must be present in your account. To update existing email address of a contact with the new one please pass EMAIL in attributes. For example, `{ \"EMAIL\":\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\":\"Roger\"}`. The attribute's parameter should be passed in capital letter while updating a contact. Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in \"SMS\" field should be passed with proper country code. For example {\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"} + * @param object $attributes Pass the set of attributes to be updated. These attributes must be present in your account. To update existing email address of a contact with the new one please pass EMAIL in attribtes. For example, `{ \"EMAIL\":\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\":\"Roger\"}`. Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in \"SMS\" field should be passed with proper country code. For example {\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"} * * @return $this */ @@ -259,121 +259,121 @@ public function setAttributes($attributes) } /** - * Gets emailBlacklisted + * Gets email_blacklisted * * @return bool */ public function getEmailBlacklisted() { - return $this->container['emailBlacklisted']; + return $this->container['email_blacklisted']; } /** - * Sets emailBlacklisted + * Sets email_blacklisted * - * @param bool $emailBlacklisted Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true) + * @param bool $email_blacklisted Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true) * * @return $this */ - public function setEmailBlacklisted($emailBlacklisted) + public function setEmailBlacklisted($email_blacklisted) { - $this->container['emailBlacklisted'] = $emailBlacklisted; + $this->container['email_blacklisted'] = $email_blacklisted; return $this; } /** - * Gets smsBlacklisted + * Gets sms_blacklisted * * @return bool */ public function getSmsBlacklisted() { - return $this->container['smsBlacklisted']; + return $this->container['sms_blacklisted']; } /** - * Sets smsBlacklisted + * Sets sms_blacklisted * - * @param bool $smsBlacklisted Set/unset this field to blacklist/allow the contact for SMS (smsBlacklisted = true) + * @param bool $sms_blacklisted Set/unset this field to blacklist/allow the contact for SMS (smsBlacklisted = true) * * @return $this */ - public function setSmsBlacklisted($smsBlacklisted) + public function setSmsBlacklisted($sms_blacklisted) { - $this->container['smsBlacklisted'] = $smsBlacklisted; + $this->container['sms_blacklisted'] = $sms_blacklisted; return $this; } /** - * Gets listIds + * Gets list_ids * * @return int[] */ public function getListIds() { - return $this->container['listIds']; + return $this->container['list_ids']; } /** - * Sets listIds + * Sets list_ids * - * @param int[] $listIds Ids of the lists to add the contact to + * @param int[] $list_ids Ids of the lists to add the contact to * * @return $this */ - public function setListIds($listIds) + public function setListIds($list_ids) { - $this->container['listIds'] = $listIds; + $this->container['list_ids'] = $list_ids; return $this; } /** - * Gets unlinkListIds + * Gets unlink_list_ids * * @return int[] */ public function getUnlinkListIds() { - return $this->container['unlinkListIds']; + return $this->container['unlink_list_ids']; } /** - * Sets unlinkListIds + * Sets unlink_list_ids * - * @param int[] $unlinkListIds Ids of the lists to remove the contact from + * @param int[] $unlink_list_ids Ids of the lists to remove the contact from * * @return $this */ - public function setUnlinkListIds($unlinkListIds) + public function setUnlinkListIds($unlink_list_ids) { - $this->container['unlinkListIds'] = $unlinkListIds; + $this->container['unlink_list_ids'] = $unlink_list_ids; return $this; } /** - * Gets smtpBlacklistSender + * Gets smtp_blacklist_sender * * @return string[] */ public function getSmtpBlacklistSender() { - return $this->container['smtpBlacklistSender']; + return $this->container['smtp_blacklist_sender']; } /** - * Sets smtpBlacklistSender + * Sets smtp_blacklist_sender * - * @param string[] $smtpBlacklistSender transactional email forbidden sender for contact. Use only for email Contact + * @param string[] $smtp_blacklist_sender transactional email forbidden sender for contact. Use only for email Contact * * @return $this */ - public function setSmtpBlacklistSender($smtpBlacklistSender) + public function setSmtpBlacklistSender($smtp_blacklist_sender) { - $this->container['smtpBlacklistSender'] = $smtpBlacklistSender; + $this->container['smtp_blacklist_sender'] = $smtp_blacklist_sender; return $this; } @@ -384,6 +384,7 @@ public function setSmtpBlacklistSender($smtpBlacklistSender) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -396,6 +397,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -409,6 +411,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -425,6 +428,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/UpdateEmailCampaign.php b/lib/Model/UpdateEmailCampaign.php index 1aa6cda5..110ceacf 100644 --- a/lib/Model/UpdateEmailCampaign.php +++ b/lib/Model/UpdateEmailCampaign.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -60,31 +60,31 @@ class UpdateEmailCampaign implements ModelInterface, ArrayAccess 'tag' => 'string', 'sender' => '\SendinBlue\Client\Model\UpdateEmailCampaignSender', 'name' => 'string', - 'htmlContent' => 'string', - 'htmlUrl' => 'string', - 'scheduledAt' => 'string', + 'html_content' => 'string', + 'html_url' => 'string', + 'scheduled_at' => '\DateTime', 'subject' => 'string', - 'replyTo' => 'string', - 'toField' => 'string', + 'reply_to' => 'string', + 'to_field' => 'string', 'recipients' => '\SendinBlue\Client\Model\UpdateEmailCampaignRecipients', - 'attachmentUrl' => 'string', - 'inlineImageActivation' => 'bool', - 'mirrorActive' => 'bool', + 'attachment_url' => 'string', + 'inline_image_activation' => 'bool', + 'mirror_active' => 'bool', 'recurring' => 'bool', 'footer' => 'string', 'header' => 'string', - 'utmCampaign' => 'string', + 'utm_campaign' => 'string', 'params' => 'object', - 'sendAtBestTime' => 'bool', - 'abTesting' => 'bool', - 'subjectA' => 'string', - 'subjectB' => 'string', - 'splitRule' => 'int', - 'winnerCriteria' => 'string', - 'winnerDelay' => 'int', - 'ipWarmupEnable' => 'bool', - 'initialQuota' => 'int', - 'increaseRate' => 'int' + 'send_at_best_time' => 'bool', + 'ab_testing' => 'bool', + 'subject_a' => 'string', + 'subject_b' => 'string', + 'split_rule' => 'int', + 'winner_criteria' => 'string', + 'winner_delay' => 'int', + 'ip_warmup_enable' => 'bool', + 'initial_quota' => 'int', + 'increase_rate' => 'int' ]; /** @@ -96,31 +96,31 @@ class UpdateEmailCampaign implements ModelInterface, ArrayAccess 'tag' => null, 'sender' => null, 'name' => null, - 'htmlContent' => null, - 'htmlUrl' => 'url', - 'scheduledAt' => null, + 'html_content' => null, + 'html_url' => 'url', + 'scheduled_at' => 'date-time', 'subject' => null, - 'replyTo' => 'email', - 'toField' => null, + 'reply_to' => 'email', + 'to_field' => null, 'recipients' => null, - 'attachmentUrl' => 'url', - 'inlineImageActivation' => null, - 'mirrorActive' => null, + 'attachment_url' => 'url', + 'inline_image_activation' => null, + 'mirror_active' => null, 'recurring' => null, 'footer' => null, 'header' => null, - 'utmCampaign' => null, + 'utm_campaign' => null, 'params' => null, - 'sendAtBestTime' => null, - 'abTesting' => null, - 'subjectA' => null, - 'subjectB' => null, - 'splitRule' => 'int64', - 'winnerCriteria' => null, - 'winnerDelay' => 'int64', - 'ipWarmupEnable' => null, - 'initialQuota' => 'int64', - 'increaseRate' => 'int64' + 'send_at_best_time' => null, + 'ab_testing' => null, + 'subject_a' => null, + 'subject_b' => null, + 'split_rule' => 'int64', + 'winner_criteria' => null, + 'winner_delay' => 'int64', + 'ip_warmup_enable' => null, + 'initial_quota' => 'int64', + 'increase_rate' => 'int64' ]; /** @@ -153,31 +153,31 @@ public static function swaggerFormats() 'tag' => 'tag', 'sender' => 'sender', 'name' => 'name', - 'htmlContent' => 'htmlContent', - 'htmlUrl' => 'htmlUrl', - 'scheduledAt' => 'scheduledAt', + 'html_content' => 'htmlContent', + 'html_url' => 'htmlUrl', + 'scheduled_at' => 'scheduledAt', 'subject' => 'subject', - 'replyTo' => 'replyTo', - 'toField' => 'toField', + 'reply_to' => 'replyTo', + 'to_field' => 'toField', 'recipients' => 'recipients', - 'attachmentUrl' => 'attachmentUrl', - 'inlineImageActivation' => 'inlineImageActivation', - 'mirrorActive' => 'mirrorActive', + 'attachment_url' => 'attachmentUrl', + 'inline_image_activation' => 'inlineImageActivation', + 'mirror_active' => 'mirrorActive', 'recurring' => 'recurring', 'footer' => 'footer', 'header' => 'header', - 'utmCampaign' => 'utmCampaign', + 'utm_campaign' => 'utmCampaign', 'params' => 'params', - 'sendAtBestTime' => 'sendAtBestTime', - 'abTesting' => 'abTesting', - 'subjectA' => 'subjectA', - 'subjectB' => 'subjectB', - 'splitRule' => 'splitRule', - 'winnerCriteria' => 'winnerCriteria', - 'winnerDelay' => 'winnerDelay', - 'ipWarmupEnable' => 'ipWarmupEnable', - 'initialQuota' => 'initialQuota', - 'increaseRate' => 'increaseRate' + 'send_at_best_time' => 'sendAtBestTime', + 'ab_testing' => 'abTesting', + 'subject_a' => 'subjectA', + 'subject_b' => 'subjectB', + 'split_rule' => 'splitRule', + 'winner_criteria' => 'winnerCriteria', + 'winner_delay' => 'winnerDelay', + 'ip_warmup_enable' => 'ipWarmupEnable', + 'initial_quota' => 'initialQuota', + 'increase_rate' => 'increaseRate' ]; /** @@ -189,31 +189,31 @@ public static function swaggerFormats() 'tag' => 'setTag', 'sender' => 'setSender', 'name' => 'setName', - 'htmlContent' => 'setHtmlContent', - 'htmlUrl' => 'setHtmlUrl', - 'scheduledAt' => 'setScheduledAt', + 'html_content' => 'setHtmlContent', + 'html_url' => 'setHtmlUrl', + 'scheduled_at' => 'setScheduledAt', 'subject' => 'setSubject', - 'replyTo' => 'setReplyTo', - 'toField' => 'setToField', + 'reply_to' => 'setReplyTo', + 'to_field' => 'setToField', 'recipients' => 'setRecipients', - 'attachmentUrl' => 'setAttachmentUrl', - 'inlineImageActivation' => 'setInlineImageActivation', - 'mirrorActive' => 'setMirrorActive', + 'attachment_url' => 'setAttachmentUrl', + 'inline_image_activation' => 'setInlineImageActivation', + 'mirror_active' => 'setMirrorActive', 'recurring' => 'setRecurring', 'footer' => 'setFooter', 'header' => 'setHeader', - 'utmCampaign' => 'setUtmCampaign', + 'utm_campaign' => 'setUtmCampaign', 'params' => 'setParams', - 'sendAtBestTime' => 'setSendAtBestTime', - 'abTesting' => 'setAbTesting', - 'subjectA' => 'setSubjectA', - 'subjectB' => 'setSubjectB', - 'splitRule' => 'setSplitRule', - 'winnerCriteria' => 'setWinnerCriteria', - 'winnerDelay' => 'setWinnerDelay', - 'ipWarmupEnable' => 'setIpWarmupEnable', - 'initialQuota' => 'setInitialQuota', - 'increaseRate' => 'setIncreaseRate' + 'send_at_best_time' => 'setSendAtBestTime', + 'ab_testing' => 'setAbTesting', + 'subject_a' => 'setSubjectA', + 'subject_b' => 'setSubjectB', + 'split_rule' => 'setSplitRule', + 'winner_criteria' => 'setWinnerCriteria', + 'winner_delay' => 'setWinnerDelay', + 'ip_warmup_enable' => 'setIpWarmupEnable', + 'initial_quota' => 'setInitialQuota', + 'increase_rate' => 'setIncreaseRate' ]; /** @@ -225,31 +225,31 @@ public static function swaggerFormats() 'tag' => 'getTag', 'sender' => 'getSender', 'name' => 'getName', - 'htmlContent' => 'getHtmlContent', - 'htmlUrl' => 'getHtmlUrl', - 'scheduledAt' => 'getScheduledAt', + 'html_content' => 'getHtmlContent', + 'html_url' => 'getHtmlUrl', + 'scheduled_at' => 'getScheduledAt', 'subject' => 'getSubject', - 'replyTo' => 'getReplyTo', - 'toField' => 'getToField', + 'reply_to' => 'getReplyTo', + 'to_field' => 'getToField', 'recipients' => 'getRecipients', - 'attachmentUrl' => 'getAttachmentUrl', - 'inlineImageActivation' => 'getInlineImageActivation', - 'mirrorActive' => 'getMirrorActive', + 'attachment_url' => 'getAttachmentUrl', + 'inline_image_activation' => 'getInlineImageActivation', + 'mirror_active' => 'getMirrorActive', 'recurring' => 'getRecurring', 'footer' => 'getFooter', 'header' => 'getHeader', - 'utmCampaign' => 'getUtmCampaign', + 'utm_campaign' => 'getUtmCampaign', 'params' => 'getParams', - 'sendAtBestTime' => 'getSendAtBestTime', - 'abTesting' => 'getAbTesting', - 'subjectA' => 'getSubjectA', - 'subjectB' => 'getSubjectB', - 'splitRule' => 'getSplitRule', - 'winnerCriteria' => 'getWinnerCriteria', - 'winnerDelay' => 'getWinnerDelay', - 'ipWarmupEnable' => 'getIpWarmupEnable', - 'initialQuota' => 'getInitialQuota', - 'increaseRate' => 'getIncreaseRate' + 'send_at_best_time' => 'getSendAtBestTime', + 'ab_testing' => 'getAbTesting', + 'subject_a' => 'getSubjectA', + 'subject_b' => 'getSubjectB', + 'split_rule' => 'getSplitRule', + 'winner_criteria' => 'getWinnerCriteria', + 'winner_delay' => 'getWinnerDelay', + 'ip_warmup_enable' => 'getIpWarmupEnable', + 'initial_quota' => 'getInitialQuota', + 'increase_rate' => 'getIncreaseRate' ]; /** @@ -330,31 +330,31 @@ public function __construct(array $data = null) $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; $this->container['sender'] = isset($data['sender']) ? $data['sender'] : null; $this->container['name'] = isset($data['name']) ? $data['name'] : null; - $this->container['htmlContent'] = isset($data['htmlContent']) ? $data['htmlContent'] : null; - $this->container['htmlUrl'] = isset($data['htmlUrl']) ? $data['htmlUrl'] : null; - $this->container['scheduledAt'] = isset($data['scheduledAt']) ? $data['scheduledAt'] : null; + $this->container['html_content'] = isset($data['html_content']) ? $data['html_content'] : null; + $this->container['html_url'] = isset($data['html_url']) ? $data['html_url'] : null; + $this->container['scheduled_at'] = isset($data['scheduled_at']) ? $data['scheduled_at'] : null; $this->container['subject'] = isset($data['subject']) ? $data['subject'] : null; - $this->container['replyTo'] = isset($data['replyTo']) ? $data['replyTo'] : null; - $this->container['toField'] = isset($data['toField']) ? $data['toField'] : null; + $this->container['reply_to'] = isset($data['reply_to']) ? $data['reply_to'] : null; + $this->container['to_field'] = isset($data['to_field']) ? $data['to_field'] : null; $this->container['recipients'] = isset($data['recipients']) ? $data['recipients'] : null; - $this->container['attachmentUrl'] = isset($data['attachmentUrl']) ? $data['attachmentUrl'] : null; - $this->container['inlineImageActivation'] = isset($data['inlineImageActivation']) ? $data['inlineImageActivation'] : false; - $this->container['mirrorActive'] = isset($data['mirrorActive']) ? $data['mirrorActive'] : null; + $this->container['attachment_url'] = isset($data['attachment_url']) ? $data['attachment_url'] : null; + $this->container['inline_image_activation'] = isset($data['inline_image_activation']) ? $data['inline_image_activation'] : false; + $this->container['mirror_active'] = isset($data['mirror_active']) ? $data['mirror_active'] : null; $this->container['recurring'] = isset($data['recurring']) ? $data['recurring'] : false; $this->container['footer'] = isset($data['footer']) ? $data['footer'] : null; $this->container['header'] = isset($data['header']) ? $data['header'] : null; - $this->container['utmCampaign'] = isset($data['utmCampaign']) ? $data['utmCampaign'] : null; + $this->container['utm_campaign'] = isset($data['utm_campaign']) ? $data['utm_campaign'] : null; $this->container['params'] = isset($data['params']) ? $data['params'] : null; - $this->container['sendAtBestTime'] = isset($data['sendAtBestTime']) ? $data['sendAtBestTime'] : null; - $this->container['abTesting'] = isset($data['abTesting']) ? $data['abTesting'] : false; - $this->container['subjectA'] = isset($data['subjectA']) ? $data['subjectA'] : null; - $this->container['subjectB'] = isset($data['subjectB']) ? $data['subjectB'] : null; - $this->container['splitRule'] = isset($data['splitRule']) ? $data['splitRule'] : null; - $this->container['winnerCriteria'] = isset($data['winnerCriteria']) ? $data['winnerCriteria'] : null; - $this->container['winnerDelay'] = isset($data['winnerDelay']) ? $data['winnerDelay'] : null; - $this->container['ipWarmupEnable'] = isset($data['ipWarmupEnable']) ? $data['ipWarmupEnable'] : false; - $this->container['initialQuota'] = isset($data['initialQuota']) ? $data['initialQuota'] : null; - $this->container['increaseRate'] = isset($data['increaseRate']) ? $data['increaseRate'] : null; + $this->container['send_at_best_time'] = isset($data['send_at_best_time']) ? $data['send_at_best_time'] : null; + $this->container['ab_testing'] = isset($data['ab_testing']) ? $data['ab_testing'] : false; + $this->container['subject_a'] = isset($data['subject_a']) ? $data['subject_a'] : null; + $this->container['subject_b'] = isset($data['subject_b']) ? $data['subject_b'] : null; + $this->container['split_rule'] = isset($data['split_rule']) ? $data['split_rule'] : null; + $this->container['winner_criteria'] = isset($data['winner_criteria']) ? $data['winner_criteria'] : null; + $this->container['winner_delay'] = isset($data['winner_delay']) ? $data['winner_delay'] : null; + $this->container['ip_warmup_enable'] = isset($data['ip_warmup_enable']) ? $data['ip_warmup_enable'] : false; + $this->container['initial_quota'] = isset($data['initial_quota']) ? $data['initial_quota'] : null; + $this->container['increase_rate'] = isset($data['increase_rate']) ? $data['increase_rate'] : null; } /** @@ -366,36 +366,36 @@ public function listInvalidProperties() { $invalidProperties = []; - if (!is_null($this->container['splitRule']) && ($this->container['splitRule'] > 50)) { - $invalidProperties[] = "invalid value for 'splitRule', must be smaller than or equal to 50."; + if (!is_null($this->container['split_rule']) && ($this->container['split_rule'] > 50)) { + $invalidProperties[] = "invalid value for 'split_rule', must be smaller than or equal to 50."; } - if (!is_null($this->container['splitRule']) && ($this->container['splitRule'] < 1)) { - $invalidProperties[] = "invalid value for 'splitRule', must be bigger than or equal to 1."; + if (!is_null($this->container['split_rule']) && ($this->container['split_rule'] < 1)) { + $invalidProperties[] = "invalid value for 'split_rule', must be bigger than or equal to 1."; } $allowedValues = $this->getWinnerCriteriaAllowableValues(); - if (!is_null($this->container['winnerCriteria']) && !in_array($this->container['winnerCriteria'], $allowedValues, true)) { + if (!is_null($this->container['winner_criteria']) && !in_array($this->container['winner_criteria'], $allowedValues, true)) { $invalidProperties[] = sprintf( - "invalid value for 'winnerCriteria', must be one of '%s'", + "invalid value for 'winner_criteria', must be one of '%s'", implode("', '", $allowedValues) ); } - if (!is_null($this->container['winnerDelay']) && ($this->container['winnerDelay'] > 168)) { - $invalidProperties[] = "invalid value for 'winnerDelay', must be smaller than or equal to 168."; + if (!is_null($this->container['winner_delay']) && ($this->container['winner_delay'] > 168)) { + $invalidProperties[] = "invalid value for 'winner_delay', must be smaller than or equal to 168."; } - if (!is_null($this->container['winnerDelay']) && ($this->container['winnerDelay'] < 1)) { - $invalidProperties[] = "invalid value for 'winnerDelay', must be bigger than or equal to 1."; + if (!is_null($this->container['winner_delay']) && ($this->container['winner_delay'] < 1)) { + $invalidProperties[] = "invalid value for 'winner_delay', must be bigger than or equal to 1."; } - if (!is_null($this->container['increaseRate']) && ($this->container['increaseRate'] > 100)) { - $invalidProperties[] = "invalid value for 'increaseRate', must be smaller than or equal to 100."; + if (!is_null($this->container['increase_rate']) && ($this->container['increase_rate'] > 100)) { + $invalidProperties[] = "invalid value for 'increase_rate', must be smaller than or equal to 100."; } - if (!is_null($this->container['increaseRate']) && ($this->container['increaseRate'] < 0)) { - $invalidProperties[] = "invalid value for 'increaseRate', must be bigger than or equal to 0."; + if (!is_null($this->container['increase_rate']) && ($this->container['increase_rate'] < 0)) { + $invalidProperties[] = "invalid value for 'increase_rate', must be bigger than or equal to 0."; } return $invalidProperties; @@ -486,73 +486,73 @@ public function setName($name) } /** - * Gets htmlContent + * Gets html_content * * @return string */ public function getHtmlContent() { - return $this->container['htmlContent']; + return $this->container['html_content']; } /** - * Sets htmlContent + * Sets html_content * - * @param string $htmlContent Body of the message (HTML version). If the campaign is designed using Drag & Drop editor via HTML content, then the design page will not have Drag & Drop editor access for that campaign. REQUIRED if htmlUrl is empty + * @param string $html_content Body of the message (HTML version). REQUIRED if htmlUrl is empty * * @return $this */ - public function setHtmlContent($htmlContent) + public function setHtmlContent($html_content) { - $this->container['htmlContent'] = $htmlContent; + $this->container['html_content'] = $html_content; return $this; } /** - * Gets htmlUrl + * Gets html_url * * @return string */ public function getHtmlUrl() { - return $this->container['htmlUrl']; + return $this->container['html_url']; } /** - * Sets htmlUrl + * Sets html_url * - * @param string $htmlUrl Url which contents the body of the email message. REQUIRED if htmlContent is empty + * @param string $html_url Url which contents the body of the email message. REQUIRED if htmlContent is empty * * @return $this */ - public function setHtmlUrl($htmlUrl) + public function setHtmlUrl($html_url) { - $this->container['htmlUrl'] = $htmlUrl; + $this->container['html_url'] = $html_url; return $this; } /** - * Gets scheduledAt + * Gets scheduled_at * - * @return string + * @return \DateTime */ public function getScheduledAt() { - return $this->container['scheduledAt']; + return $this->container['scheduled_at']; } /** - * Sets scheduledAt + * Sets scheduled_at * - * @param string $scheduledAt UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part). + * @param \DateTime $scheduled_at UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part). * * @return $this */ - public function setScheduledAt($scheduledAt) + public function setScheduledAt($scheduled_at) { - $this->container['scheduledAt'] = $scheduledAt; + $this->container['scheduled_at'] = $scheduled_at; return $this; } @@ -582,49 +582,49 @@ public function setSubject($subject) } /** - * Gets replyTo + * Gets reply_to * * @return string */ public function getReplyTo() { - return $this->container['replyTo']; + return $this->container['reply_to']; } /** - * Sets replyTo + * Sets reply_to * - * @param string $replyTo Email on which campaign recipients will be able to reply to + * @param string $reply_to Email on which campaign recipients will be able to reply to * * @return $this */ - public function setReplyTo($replyTo) + public function setReplyTo($reply_to) { - $this->container['replyTo'] = $replyTo; + $this->container['reply_to'] = $reply_to; return $this; } /** - * Gets toField + * Gets to_field * * @return string */ public function getToField() { - return $this->container['toField']; + return $this->container['to_field']; } /** - * Sets toField + * Sets to_field * - * @param string $toField To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization + * @param string $to_field To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization * * @return $this */ - public function setToField($toField) + public function setToField($to_field) { - $this->container['toField'] = $toField; + $this->container['to_field'] = $to_field; return $this; } @@ -654,73 +654,73 @@ public function setRecipients($recipients) } /** - * Gets attachmentUrl + * Gets attachment_url * * @return string */ public function getAttachmentUrl() { - return $this->container['attachmentUrl']; + return $this->container['attachment_url']; } /** - * Sets attachmentUrl + * Sets attachment_url * - * @param string $attachmentUrl Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps + * @param string $attachment_url Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps * * @return $this */ - public function setAttachmentUrl($attachmentUrl) + public function setAttachmentUrl($attachment_url) { - $this->container['attachmentUrl'] = $attachmentUrl; + $this->container['attachment_url'] = $attachment_url; return $this; } /** - * Gets inlineImageActivation + * Gets inline_image_activation * * @return bool */ public function getInlineImageActivation() { - return $this->container['inlineImageActivation']; + return $this->container['inline_image_activation']; } /** - * Sets inlineImageActivation + * Sets inline_image_activation * - * @param bool $inlineImageActivation Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. You cannot send a campaign of more than 4MB with images embedded in the email. Campaigns with the images embedded in the email must be sent to less than 5000 contacts. + * @param bool $inline_image_activation Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. You cannot send a campaign of more than 4MB with images embedded in the email. Campaigns with the images embedded in the email must be sent to less than 5000 contacts. * * @return $this */ - public function setInlineImageActivation($inlineImageActivation) + public function setInlineImageActivation($inline_image_activation) { - $this->container['inlineImageActivation'] = $inlineImageActivation; + $this->container['inline_image_activation'] = $inline_image_activation; return $this; } /** - * Gets mirrorActive + * Gets mirror_active * * @return bool */ public function getMirrorActive() { - return $this->container['mirrorActive']; + return $this->container['mirror_active']; } /** - * Sets mirrorActive + * Sets mirror_active * - * @param bool $mirrorActive Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign + * @param bool $mirror_active Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign * * @return $this */ - public function setMirrorActive($mirrorActive) + public function setMirrorActive($mirror_active) { - $this->container['mirrorActive'] = $mirrorActive; + $this->container['mirror_active'] = $mirror_active; return $this; } @@ -798,25 +798,25 @@ public function setHeader($header) } /** - * Gets utmCampaign + * Gets utm_campaign * * @return string */ public function getUtmCampaign() { - return $this->container['utmCampaign']; + return $this->container['utm_campaign']; } /** - * Sets utmCampaign + * Sets utm_campaign * - * @param string $utmCampaign Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed + * @param string $utm_campaign Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed * * @return $this */ - public function setUtmCampaign($utmCampaign) + public function setUtmCampaign($utm_campaign) { - $this->container['utmCampaign'] = $utmCampaign; + $this->container['utm_campaign'] = $utm_campaign; return $this; } @@ -846,274 +846,274 @@ public function setParams($params) } /** - * Gets sendAtBestTime + * Gets send_at_best_time * * @return bool */ public function getSendAtBestTime() { - return $this->container['sendAtBestTime']; + return $this->container['send_at_best_time']; } /** - * Sets sendAtBestTime + * Sets send_at_best_time * - * @param bool $sendAtBestTime Set this to true if you want to send your campaign at best time. Note:- if true, warmup ip will be disabled. + * @param bool $send_at_best_time Set this to true if you want to send your campaign at best time. Note:- if true, warmup ip will be disabled. * * @return $this */ - public function setSendAtBestTime($sendAtBestTime) + public function setSendAtBestTime($send_at_best_time) { - $this->container['sendAtBestTime'] = $sendAtBestTime; + $this->container['send_at_best_time'] = $send_at_best_time; return $this; } /** - * Gets abTesting + * Gets ab_testing * * @return bool */ public function getAbTesting() { - return $this->container['abTesting']; + return $this->container['ab_testing']; } /** - * Sets abTesting + * Sets ab_testing * - * @param bool $abTesting Status of A/B Test. abTesting = false means it is disabled, & abTesting = true means it is enabled. 'subjectA', 'subjectB', 'splitRule', 'winnerCriteria' & 'winnerDelay' will be considered if abTesting is set to true. 'subject' if passed is ignored. Can be set to true only if 'sendAtBestTime' is 'false'. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B + * @param bool $ab_testing Status of A/B Test. abTesting = false means it is disabled, & abTesting = true means it is enabled. 'subjectA', 'subjectB', 'splitRule', 'winnerCriteria' & 'winnerDelay' will be considered if abTesting is set to true. 'subject' if passed is ignored. Can be set to true only if 'sendAtBestTime' is 'false'. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B * * @return $this */ - public function setAbTesting($abTesting) + public function setAbTesting($ab_testing) { - $this->container['abTesting'] = $abTesting; + $this->container['ab_testing'] = $ab_testing; return $this; } /** - * Gets subjectA + * Gets subject_a * * @return string */ public function getSubjectA() { - return $this->container['subjectA']; + return $this->container['subject_a']; } /** - * Sets subjectA + * Sets subject_a * - * @param string $subjectA Subject A of the campaign. Considered if abTesting = true. subjectA & subjectB should have unique value + * @param string $subject_a Subject A of the campaign. Considered if abTesting = true. subjectA & subjectB should have unique value * * @return $this */ - public function setSubjectA($subjectA) + public function setSubjectA($subject_a) { - $this->container['subjectA'] = $subjectA; + $this->container['subject_a'] = $subject_a; return $this; } /** - * Gets subjectB + * Gets subject_b * * @return string */ public function getSubjectB() { - return $this->container['subjectB']; + return $this->container['subject_b']; } /** - * Sets subjectB + * Sets subject_b * - * @param string $subjectB Subject B of the campaign. Considered if abTesting = true. subjectA & subjectB should have unique value + * @param string $subject_b Subject B of the campaign. Considered if abTesting = true. subjectA & subjectB should have unique value * * @return $this */ - public function setSubjectB($subjectB) + public function setSubjectB($subject_b) { - $this->container['subjectB'] = $subjectB; + $this->container['subject_b'] = $subject_b; return $this; } /** - * Gets splitRule + * Gets split_rule * * @return int */ public function getSplitRule() { - return $this->container['splitRule']; + return $this->container['split_rule']; } /** - * Sets splitRule + * Sets split_rule * - * @param int $splitRule Add the size of your test groups. Considered if abTesting = true. We'll send version A and B to a random sample of recipients, and then the winning version to everyone else + * @param int $split_rule Add the size of your test groups. Considered if abTesting = true. We'll send version A and B to a random sample of recipients, and then the winning version to everyone else * * @return $this */ - public function setSplitRule($splitRule) + public function setSplitRule($split_rule) { - if (!is_null($splitRule) && ($splitRule > 50)) { - throw new \InvalidArgumentException('invalid value for $splitRule when calling UpdateEmailCampaign., must be smaller than or equal to 50.'); + if (!is_null($split_rule) && ($split_rule > 50)) { + throw new \InvalidArgumentException('invalid value for $split_rule when calling UpdateEmailCampaign., must be smaller than or equal to 50.'); } - if (!is_null($splitRule) && ($splitRule < 1)) { - throw new \InvalidArgumentException('invalid value for $splitRule when calling UpdateEmailCampaign., must be bigger than or equal to 1.'); + if (!is_null($split_rule) && ($split_rule < 1)) { + throw new \InvalidArgumentException('invalid value for $split_rule when calling UpdateEmailCampaign., must be bigger than or equal to 1.'); } - $this->container['splitRule'] = $splitRule; + $this->container['split_rule'] = $split_rule; return $this; } /** - * Gets winnerCriteria + * Gets winner_criteria * * @return string */ public function getWinnerCriteria() { - return $this->container['winnerCriteria']; + return $this->container['winner_criteria']; } /** - * Sets winnerCriteria + * Sets winner_criteria * - * @param string $winnerCriteria Choose the metrics that will determinate the winning version. Considered if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerCriteria' is ignored if passed or alreday exist in record + * @param string $winner_criteria Choose the metrics that will determinate the winning version. Considered if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerCriteria' is ignored if passed or alreday exist in record * * @return $this */ - public function setWinnerCriteria($winnerCriteria) + public function setWinnerCriteria($winner_criteria) { $allowedValues = $this->getWinnerCriteriaAllowableValues(); - if (!is_null($winnerCriteria) && !in_array($winnerCriteria, $allowedValues, true)) { + if (!is_null($winner_criteria) && !in_array($winner_criteria, $allowedValues, true)) { throw new \InvalidArgumentException( sprintf( - "Invalid value for 'winnerCriteria', must be one of '%s'", + "Invalid value for 'winner_criteria', must be one of '%s'", implode("', '", $allowedValues) ) ); } - $this->container['winnerCriteria'] = $winnerCriteria; + $this->container['winner_criteria'] = $winner_criteria; return $this; } /** - * Gets winnerDelay + * Gets winner_delay * * @return int */ public function getWinnerDelay() { - return $this->container['winnerDelay']; + return $this->container['winner_delay']; } /** - * Sets winnerDelay + * Sets winner_delay * - * @param int $winnerDelay Choose the duration of the test in hours. Maximum is 7 days, pass 24*7 = 168 hours. The winning version will be sent at the end of the test. Considered if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerDelay' is ignored if passed or alreday exist in record + * @param int $winner_delay Choose the duration of the test in hours. Maximum is 7 days, pass 24*7 = 168 hours. The winning version will be sent at the end of the test. Considered if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerDelay' is ignored if passed or alreday exist in record * * @return $this */ - public function setWinnerDelay($winnerDelay) + public function setWinnerDelay($winner_delay) { - if (!is_null($winnerDelay) && ($winnerDelay > 168)) { - throw new \InvalidArgumentException('invalid value for $winnerDelay when calling UpdateEmailCampaign., must be smaller than or equal to 168.'); + if (!is_null($winner_delay) && ($winner_delay > 168)) { + throw new \InvalidArgumentException('invalid value for $winner_delay when calling UpdateEmailCampaign., must be smaller than or equal to 168.'); } - if (!is_null($winnerDelay) && ($winnerDelay < 1)) { - throw new \InvalidArgumentException('invalid value for $winnerDelay when calling UpdateEmailCampaign., must be bigger than or equal to 1.'); + if (!is_null($winner_delay) && ($winner_delay < 1)) { + throw new \InvalidArgumentException('invalid value for $winner_delay when calling UpdateEmailCampaign., must be bigger than or equal to 1.'); } - $this->container['winnerDelay'] = $winnerDelay; + $this->container['winner_delay'] = $winner_delay; return $this; } /** - * Gets ipWarmupEnable + * Gets ip_warmup_enable * * @return bool */ public function getIpWarmupEnable() { - return $this->container['ipWarmupEnable']; + return $this->container['ip_warmup_enable']; } /** - * Sets ipWarmupEnable + * Sets ip_warmup_enable * - * @param bool $ipWarmupEnable Available for dedicated ip clients. Set this to true if you wish to warm up your ip. + * @param bool $ip_warmup_enable Available for dedicated ip clients. Set this to true if you wish to warm up your ip. * * @return $this */ - public function setIpWarmupEnable($ipWarmupEnable) + public function setIpWarmupEnable($ip_warmup_enable) { - $this->container['ipWarmupEnable'] = $ipWarmupEnable; + $this->container['ip_warmup_enable'] = $ip_warmup_enable; return $this; } /** - * Gets initialQuota + * Gets initial_quota * * @return int */ public function getInitialQuota() { - return $this->container['initialQuota']; + return $this->container['initial_quota']; } /** - * Sets initialQuota + * Sets initial_quota * - * @param int $initialQuota Set an initial quota greater than 1 for warming up your ip. We recommend you set a value of 3000. + * @param int $initial_quota Set an initial quota greater than 1 for warming up your ip. We recommend you set a value of 3000. * * @return $this */ - public function setInitialQuota($initialQuota) + public function setInitialQuota($initial_quota) { - $this->container['initialQuota'] = $initialQuota; + $this->container['initial_quota'] = $initial_quota; return $this; } /** - * Gets increaseRate + * Gets increase_rate * * @return int */ public function getIncreaseRate() { - return $this->container['increaseRate']; + return $this->container['increase_rate']; } /** - * Sets increaseRate + * Sets increase_rate * - * @param int $increaseRate Set a percentage increase rate for warming up your ip. We recommend you set the increase rate to 30% per day. If you want to send the same number of emails every day, set the daily increase value to 0%. + * @param int $increase_rate Set a percentage increase rate for warming up your ip. We recommend you set the increase rate to 30% per day. If you want to send the same number of emails every day, set the daily increase value to 0%. * * @return $this */ - public function setIncreaseRate($increaseRate) + public function setIncreaseRate($increase_rate) { - if (!is_null($increaseRate) && ($increaseRate > 100)) { - throw new \InvalidArgumentException('invalid value for $increaseRate when calling UpdateEmailCampaign., must be smaller than or equal to 100.'); + if (!is_null($increase_rate) && ($increase_rate > 100)) { + throw new \InvalidArgumentException('invalid value for $increase_rate when calling UpdateEmailCampaign., must be smaller than or equal to 100.'); } - if (!is_null($increaseRate) && ($increaseRate < 0)) { - throw new \InvalidArgumentException('invalid value for $increaseRate when calling UpdateEmailCampaign., must be bigger than or equal to 0.'); + if (!is_null($increase_rate) && ($increase_rate < 0)) { + throw new \InvalidArgumentException('invalid value for $increase_rate when calling UpdateEmailCampaign., must be bigger than or equal to 0.'); } - $this->container['increaseRate'] = $increaseRate; + $this->container['increase_rate'] = $increase_rate; return $this; } @@ -1124,6 +1124,7 @@ public function setIncreaseRate($increaseRate) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -1136,6 +1137,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -1149,6 +1151,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -1165,6 +1168,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/UpdateEmailCampaignRecipients.php b/lib/Model/UpdateEmailCampaignRecipients.php index 98b9d948..78bace82 100644 --- a/lib/Model/UpdateEmailCampaignRecipients.php +++ b/lib/Model/UpdateEmailCampaignRecipients.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -58,8 +58,8 @@ class UpdateEmailCampaignRecipients implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'exclusionListIds' => 'int[]', - 'listIds' => 'int[]' + 'exclusion_list_ids' => 'int[]', + 'list_ids' => 'int[]' ]; /** @@ -68,8 +68,8 @@ class UpdateEmailCampaignRecipients implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'exclusionListIds' => 'int64', - 'listIds' => 'int64' + 'exclusion_list_ids' => 'int64', + 'list_ids' => 'int64' ]; /** @@ -99,8 +99,8 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'exclusionListIds' => 'exclusionListIds', - 'listIds' => 'listIds' + 'exclusion_list_ids' => 'exclusionListIds', + 'list_ids' => 'listIds' ]; /** @@ -109,8 +109,8 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'exclusionListIds' => 'setExclusionListIds', - 'listIds' => 'setListIds' + 'exclusion_list_ids' => 'setExclusionListIds', + 'list_ids' => 'setListIds' ]; /** @@ -119,8 +119,8 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'exclusionListIds' => 'getExclusionListIds', - 'listIds' => 'getListIds' + 'exclusion_list_ids' => 'getExclusionListIds', + 'list_ids' => 'getListIds' ]; /** @@ -183,8 +183,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['exclusionListIds'] = isset($data['exclusionListIds']) ? $data['exclusionListIds'] : null; - $this->container['listIds'] = isset($data['listIds']) ? $data['listIds'] : null; + $this->container['exclusion_list_ids'] = isset($data['exclusion_list_ids']) ? $data['exclusion_list_ids'] : null; + $this->container['list_ids'] = isset($data['list_ids']) ? $data['list_ids'] : null; } /** @@ -212,49 +212,49 @@ public function valid() /** - * Gets exclusionListIds + * Gets exclusion_list_ids * * @return int[] */ public function getExclusionListIds() { - return $this->container['exclusionListIds']; + return $this->container['exclusion_list_ids']; } /** - * Sets exclusionListIds + * Sets exclusion_list_ids * - * @param int[] $exclusionListIds List ids which have to be excluded from a campaign + * @param int[] $exclusion_list_ids List ids which have to be excluded from a campaign * * @return $this */ - public function setExclusionListIds($exclusionListIds) + public function setExclusionListIds($exclusion_list_ids) { - $this->container['exclusionListIds'] = $exclusionListIds; + $this->container['exclusion_list_ids'] = $exclusion_list_ids; return $this; } /** - * Gets listIds + * Gets list_ids * * @return int[] */ public function getListIds() { - return $this->container['listIds']; + return $this->container['list_ids']; } /** - * Sets listIds + * Sets list_ids * - * @param int[] $listIds Lists Ids to send the campaign to. REQUIRED if already not present in campaign and scheduledAt is not empty + * @param int[] $list_ids Lists Ids to send the campaign to. REQUIRED if already not present in campaign and scheduledAt is not empty * * @return $this */ - public function setListIds($listIds) + public function setListIds($list_ids) { - $this->container['listIds'] = $listIds; + $this->container['list_ids'] = $list_ids; return $this; } @@ -265,6 +265,7 @@ public function setListIds($listIds) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -277,6 +278,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -290,6 +292,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -306,6 +309,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/UpdateEmailCampaignSender.php b/lib/Model/UpdateEmailCampaignSender.php index 261f91ee..415e11f2 100644 --- a/lib/Model/UpdateEmailCampaignSender.php +++ b/lib/Model/UpdateEmailCampaignSender.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -36,7 +36,7 @@ * UpdateEmailCampaignSender Class Doc Comment * * @category Class - * @description Sender details including id or email and name (optional). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example `{\"name\":\"xyz\", \"email\":\"example@abc.com\"}` , `{\"name\":\"xyz\", \"id\":123}` + * @description Sender details including id or email and name (optional). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example `{\"name\":\"xyz\", \"email\":\"example@abc.com\"}` , `{\"name\":\"xyz\", \"id\":123}` * @package SendinBlue\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen @@ -295,6 +295,7 @@ public function setId($id) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -307,6 +308,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -320,6 +322,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -336,6 +339,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/UpdateList.php b/lib/Model/UpdateList.php index a07f372a..d7ab6632 100644 --- a/lib/Model/UpdateList.php +++ b/lib/Model/UpdateList.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -58,7 +58,7 @@ class UpdateList implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'name' => 'string', - 'folderId' => 'int' + 'folder_id' => 'int' ]; /** @@ -68,7 +68,7 @@ class UpdateList implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'name' => null, - 'folderId' => 'int64' + 'folder_id' => 'int64' ]; /** @@ -99,7 +99,7 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'name' => 'name', - 'folderId' => 'folderId' + 'folder_id' => 'folderId' ]; /** @@ -109,7 +109,7 @@ public static function swaggerFormats() */ protected static $setters = [ 'name' => 'setName', - 'folderId' => 'setFolderId' + 'folder_id' => 'setFolderId' ]; /** @@ -119,7 +119,7 @@ public static function swaggerFormats() */ protected static $getters = [ 'name' => 'getName', - 'folderId' => 'getFolderId' + 'folder_id' => 'getFolderId' ]; /** @@ -183,7 +183,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['name'] = isset($data['name']) ? $data['name'] : null; - $this->container['folderId'] = isset($data['folderId']) ? $data['folderId'] : null; + $this->container['folder_id'] = isset($data['folder_id']) ? $data['folder_id'] : null; } /** @@ -235,25 +235,25 @@ public function setName($name) } /** - * Gets folderId + * Gets folder_id * * @return int */ public function getFolderId() { - return $this->container['folderId']; + return $this->container['folder_id']; } /** - * Sets folderId + * Sets folder_id * - * @param int $folderId Id of the folder in which the list is to be moved. Either of the two parameters (name, folderId) can be updated at a time. + * @param int $folder_id Id of the folder in which the list is to be moved. Either of the two parameters (name, folderId) can be updated at a time. * * @return $this */ - public function setFolderId($folderId) + public function setFolderId($folder_id) { - $this->container['folderId'] = $folderId; + $this->container['folder_id'] = $folder_id; return $this; } @@ -264,6 +264,7 @@ public function setFolderId($folderId) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -276,6 +277,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -289,6 +291,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -305,6 +308,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/UpdateSender.php b/lib/Model/UpdateSender.php index 5dae884c..cc29995a 100644 --- a/lib/Model/UpdateSender.php +++ b/lib/Model/UpdateSender.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -294,6 +294,7 @@ public function setIps($ips) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -306,6 +307,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -319,6 +321,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -335,6 +338,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/UpdateSmsCampaign.php b/lib/Model/UpdateSmsCampaign.php index 38f07890..4ff98e00 100644 --- a/lib/Model/UpdateSmsCampaign.php +++ b/lib/Model/UpdateSmsCampaign.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -61,8 +61,7 @@ class UpdateSmsCampaign implements ModelInterface, ArrayAccess 'sender' => 'string', 'content' => 'string', 'recipients' => '\SendinBlue\Client\Model\CreateSmsCampaignRecipients', - 'scheduledAt' => 'string', - 'unicodeEnabled' => 'bool' + 'scheduled_at' => '\DateTime' ]; /** @@ -75,8 +74,7 @@ class UpdateSmsCampaign implements ModelInterface, ArrayAccess 'sender' => null, 'content' => null, 'recipients' => null, - 'scheduledAt' => null, - 'unicodeEnabled' => null + 'scheduled_at' => 'date-time' ]; /** @@ -110,8 +108,7 @@ public static function swaggerFormats() 'sender' => 'sender', 'content' => 'content', 'recipients' => 'recipients', - 'scheduledAt' => 'scheduledAt', - 'unicodeEnabled' => 'unicodeEnabled' + 'scheduled_at' => 'scheduledAt' ]; /** @@ -124,8 +121,7 @@ public static function swaggerFormats() 'sender' => 'setSender', 'content' => 'setContent', 'recipients' => 'setRecipients', - 'scheduledAt' => 'setScheduledAt', - 'unicodeEnabled' => 'setUnicodeEnabled' + 'scheduled_at' => 'setScheduledAt' ]; /** @@ -138,8 +134,7 @@ public static function swaggerFormats() 'sender' => 'getSender', 'content' => 'getContent', 'recipients' => 'getRecipients', - 'scheduledAt' => 'getScheduledAt', - 'unicodeEnabled' => 'getUnicodeEnabled' + 'scheduled_at' => 'getScheduledAt' ]; /** @@ -206,8 +201,7 @@ public function __construct(array $data = null) $this->container['sender'] = isset($data['sender']) ? $data['sender'] : null; $this->container['content'] = isset($data['content']) ? $data['content'] : null; $this->container['recipients'] = isset($data['recipients']) ? $data['recipients'] : null; - $this->container['scheduledAt'] = isset($data['scheduledAt']) ? $data['scheduledAt'] : null; - $this->container['unicodeEnabled'] = isset($data['unicodeEnabled']) ? $data['unicodeEnabled'] : false; + $this->container['scheduled_at'] = isset($data['scheduled_at']) ? $data['scheduled_at'] : null; } /** @@ -339,49 +333,25 @@ public function setRecipients($recipients) } /** - * Gets scheduledAt + * Gets scheduled_at * - * @return string + * @return \DateTime */ public function getScheduledAt() { - return $this->container['scheduledAt']; - } - - /** - * Sets scheduledAt - * - * @param string $scheduledAt UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. - * - * @return $this - */ - public function setScheduledAt($scheduledAt) - { - $this->container['scheduledAt'] = $scheduledAt; - - return $this; - } - - /** - * Gets unicodeEnabled - * - * @return bool - */ - public function getUnicodeEnabled() - { - return $this->container['unicodeEnabled']; + return $this->container['scheduled_at']; } /** - * Sets unicodeEnabled + * Sets scheduled_at * - * @param bool $unicodeEnabled Format of the message. It indicates whether the content should be treated as unicode or not. + * @param \DateTime $scheduled_at UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. * * @return $this */ - public function setUnicodeEnabled($unicodeEnabled) + public function setScheduledAt($scheduled_at) { - $this->container['unicodeEnabled'] = $unicodeEnabled; + $this->container['scheduled_at'] = $scheduled_at; return $this; } @@ -392,6 +362,7 @@ public function setUnicodeEnabled($unicodeEnabled) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -404,6 +375,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -417,6 +389,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -433,6 +406,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/UpdateSmtpTemplate.php b/lib/Model/UpdateSmtpTemplate.php index f182f508..00d7d233 100644 --- a/lib/Model/UpdateSmtpTemplate.php +++ b/lib/Model/UpdateSmtpTemplate.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -59,14 +59,14 @@ class UpdateSmtpTemplate implements ModelInterface, ArrayAccess protected static $swaggerTypes = [ 'tag' => 'string', 'sender' => '\SendinBlue\Client\Model\UpdateSmtpTemplateSender', - 'templateName' => 'string', - 'htmlContent' => 'string', - 'htmlUrl' => 'string', + 'template_name' => 'string', + 'html_content' => 'string', + 'html_url' => 'string', 'subject' => 'string', - 'replyTo' => 'string', - 'toField' => 'string', - 'attachmentUrl' => 'string', - 'isActive' => 'bool' + 'reply_to' => 'string', + 'to_field' => 'string', + 'attachment_url' => 'string', + 'is_active' => 'bool' ]; /** @@ -77,14 +77,14 @@ class UpdateSmtpTemplate implements ModelInterface, ArrayAccess protected static $swaggerFormats = [ 'tag' => null, 'sender' => null, - 'templateName' => null, - 'htmlContent' => null, - 'htmlUrl' => 'url', + 'template_name' => null, + 'html_content' => null, + 'html_url' => 'url', 'subject' => null, - 'replyTo' => 'email', - 'toField' => null, - 'attachmentUrl' => 'url', - 'isActive' => null + 'reply_to' => 'email', + 'to_field' => null, + 'attachment_url' => 'url', + 'is_active' => null ]; /** @@ -116,14 +116,14 @@ public static function swaggerFormats() protected static $attributeMap = [ 'tag' => 'tag', 'sender' => 'sender', - 'templateName' => 'templateName', - 'htmlContent' => 'htmlContent', - 'htmlUrl' => 'htmlUrl', + 'template_name' => 'templateName', + 'html_content' => 'htmlContent', + 'html_url' => 'htmlUrl', 'subject' => 'subject', - 'replyTo' => 'replyTo', - 'toField' => 'toField', - 'attachmentUrl' => 'attachmentUrl', - 'isActive' => 'isActive' + 'reply_to' => 'replyTo', + 'to_field' => 'toField', + 'attachment_url' => 'attachmentUrl', + 'is_active' => 'isActive' ]; /** @@ -134,14 +134,14 @@ public static function swaggerFormats() protected static $setters = [ 'tag' => 'setTag', 'sender' => 'setSender', - 'templateName' => 'setTemplateName', - 'htmlContent' => 'setHtmlContent', - 'htmlUrl' => 'setHtmlUrl', + 'template_name' => 'setTemplateName', + 'html_content' => 'setHtmlContent', + 'html_url' => 'setHtmlUrl', 'subject' => 'setSubject', - 'replyTo' => 'setReplyTo', - 'toField' => 'setToField', - 'attachmentUrl' => 'setAttachmentUrl', - 'isActive' => 'setIsActive' + 'reply_to' => 'setReplyTo', + 'to_field' => 'setToField', + 'attachment_url' => 'setAttachmentUrl', + 'is_active' => 'setIsActive' ]; /** @@ -152,14 +152,14 @@ public static function swaggerFormats() protected static $getters = [ 'tag' => 'getTag', 'sender' => 'getSender', - 'templateName' => 'getTemplateName', - 'htmlContent' => 'getHtmlContent', - 'htmlUrl' => 'getHtmlUrl', + 'template_name' => 'getTemplateName', + 'html_content' => 'getHtmlContent', + 'html_url' => 'getHtmlUrl', 'subject' => 'getSubject', - 'replyTo' => 'getReplyTo', - 'toField' => 'getToField', - 'attachmentUrl' => 'getAttachmentUrl', - 'isActive' => 'getIsActive' + 'reply_to' => 'getReplyTo', + 'to_field' => 'getToField', + 'attachment_url' => 'getAttachmentUrl', + 'is_active' => 'getIsActive' ]; /** @@ -224,14 +224,14 @@ public function __construct(array $data = null) { $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; $this->container['sender'] = isset($data['sender']) ? $data['sender'] : null; - $this->container['templateName'] = isset($data['templateName']) ? $data['templateName'] : null; - $this->container['htmlContent'] = isset($data['htmlContent']) ? $data['htmlContent'] : null; - $this->container['htmlUrl'] = isset($data['htmlUrl']) ? $data['htmlUrl'] : null; + $this->container['template_name'] = isset($data['template_name']) ? $data['template_name'] : null; + $this->container['html_content'] = isset($data['html_content']) ? $data['html_content'] : null; + $this->container['html_url'] = isset($data['html_url']) ? $data['html_url'] : null; $this->container['subject'] = isset($data['subject']) ? $data['subject'] : null; - $this->container['replyTo'] = isset($data['replyTo']) ? $data['replyTo'] : null; - $this->container['toField'] = isset($data['toField']) ? $data['toField'] : null; - $this->container['attachmentUrl'] = isset($data['attachmentUrl']) ? $data['attachmentUrl'] : null; - $this->container['isActive'] = isset($data['isActive']) ? $data['isActive'] : null; + $this->container['reply_to'] = isset($data['reply_to']) ? $data['reply_to'] : null; + $this->container['to_field'] = isset($data['to_field']) ? $data['to_field'] : null; + $this->container['attachment_url'] = isset($data['attachment_url']) ? $data['attachment_url'] : null; + $this->container['is_active'] = isset($data['is_active']) ? $data['is_active'] : null; } /** @@ -307,73 +307,73 @@ public function setSender($sender) } /** - * Gets templateName + * Gets template_name * * @return string */ public function getTemplateName() { - return $this->container['templateName']; + return $this->container['template_name']; } /** - * Sets templateName + * Sets template_name * - * @param string $templateName Name of the template + * @param string $template_name Name of the template * * @return $this */ - public function setTemplateName($templateName) + public function setTemplateName($template_name) { - $this->container['templateName'] = $templateName; + $this->container['template_name'] = $template_name; return $this; } /** - * Gets htmlContent + * Gets html_content * * @return string */ public function getHtmlContent() { - return $this->container['htmlContent']; + return $this->container['html_content']; } /** - * Sets htmlContent + * Sets html_content * - * @param string $htmlContent Required if htmlUrl is empty. If the template is designed using Drag & Drop editor via HTML content, then the design page will not have Drag & Drop editor access for that template. Body of the message (HTML must have more than 10 characters) + * @param string $html_content Required if htmlUrl is empty. Body of the message (HTML must have more than 10 characters) * * @return $this */ - public function setHtmlContent($htmlContent) + public function setHtmlContent($html_content) { - $this->container['htmlContent'] = $htmlContent; + $this->container['html_content'] = $html_content; return $this; } /** - * Gets htmlUrl + * Gets html_url * * @return string */ public function getHtmlUrl() { - return $this->container['htmlUrl']; + return $this->container['html_url']; } /** - * Sets htmlUrl + * Sets html_url * - * @param string $htmlUrl Required if htmlContent is empty. URL to the body of the email (HTML) + * @param string $html_url Required if htmlContent is empty. URL to the body of the email (HTML) * * @return $this */ - public function setHtmlUrl($htmlUrl) + public function setHtmlUrl($html_url) { - $this->container['htmlUrl'] = $htmlUrl; + $this->container['html_url'] = $html_url; return $this; } @@ -403,97 +403,97 @@ public function setSubject($subject) } /** - * Gets replyTo + * Gets reply_to * * @return string */ public function getReplyTo() { - return $this->container['replyTo']; + return $this->container['reply_to']; } /** - * Sets replyTo + * Sets reply_to * - * @param string $replyTo Email on which campaign recipients will be able to reply to + * @param string $reply_to Email on which campaign recipients will be able to reply to * * @return $this */ - public function setReplyTo($replyTo) + public function setReplyTo($reply_to) { - $this->container['replyTo'] = $replyTo; + $this->container['reply_to'] = $reply_to; return $this; } /** - * Gets toField + * Gets to_field * * @return string */ public function getToField() { - return $this->container['toField']; + return $this->container['to_field']; } /** - * Sets toField + * Sets to_field * - * @param string $toField To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization + * @param string $to_field To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization * * @return $this */ - public function setToField($toField) + public function setToField($to_field) { - $this->container['toField'] = $toField; + $this->container['to_field'] = $to_field; return $this; } /** - * Gets attachmentUrl + * Gets attachment_url * * @return string */ public function getAttachmentUrl() { - return $this->container['attachmentUrl']; + return $this->container['attachment_url']; } /** - * Sets attachmentUrl + * Sets attachment_url * - * @param string $attachmentUrl Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps + * @param string $attachment_url Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps * * @return $this */ - public function setAttachmentUrl($attachmentUrl) + public function setAttachmentUrl($attachment_url) { - $this->container['attachmentUrl'] = $attachmentUrl; + $this->container['attachment_url'] = $attachment_url; return $this; } /** - * Gets isActive + * Gets is_active * * @return bool */ public function getIsActive() { - return $this->container['isActive']; + return $this->container['is_active']; } /** - * Sets isActive + * Sets is_active * - * @param bool $isActive Status of the template. isActive = false means template is inactive, isActive = true means template is active + * @param bool $is_active Status of the template. isActive = false means template is inactive, isActive = true means template is active * * @return $this */ - public function setIsActive($isActive) + public function setIsActive($is_active) { - $this->container['isActive'] = $isActive; + $this->container['is_active'] = $is_active; return $this; } @@ -504,6 +504,7 @@ public function setIsActive($isActive) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -516,6 +517,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -529,6 +531,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -545,6 +548,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/UpdateSmtpTemplateSender.php b/lib/Model/UpdateSmtpTemplateSender.php index 8fb86074..8744ac03 100644 --- a/lib/Model/UpdateSmtpTemplateSender.php +++ b/lib/Model/UpdateSmtpTemplateSender.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -36,7 +36,7 @@ * UpdateSmtpTemplateSender Class Doc Comment * * @category Class - * @description Sender details including id or email and name (optional). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example `{\"name\":\"xyz\", \"email\":\"example@abc.com\"}` , `{\"name\":\"xyz\", \"id\":123}` + * @description Sender details including id or email and name (optional). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example `{\"name\":\"xyz\", \"email\":\"example@abc.com\"}` , `{\"name\":\"xyz\", \"id\":123}` * @package SendinBlue\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen @@ -295,6 +295,7 @@ public function setId($id) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -307,6 +308,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -320,6 +322,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -336,6 +339,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/UpdateWebhook.php b/lib/Model/UpdateWebhook.php index 1bb3d8c0..424f371c 100644 --- a/lib/Model/UpdateWebhook.php +++ b/lib/Model/UpdateWebhook.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -59,8 +59,7 @@ class UpdateWebhook implements ModelInterface, ArrayAccess protected static $swaggerTypes = [ 'url' => 'string', 'description' => 'string', - 'events' => 'string[]', - 'domain' => 'string' + 'events' => 'string[]' ]; /** @@ -71,8 +70,7 @@ class UpdateWebhook implements ModelInterface, ArrayAccess protected static $swaggerFormats = [ 'url' => 'url', 'description' => null, - 'events' => null, - 'domain' => null + 'events' => null ]; /** @@ -104,8 +102,7 @@ public static function swaggerFormats() protected static $attributeMap = [ 'url' => 'url', 'description' => 'description', - 'events' => 'events', - 'domain' => 'domain' + 'events' => 'events' ]; /** @@ -116,8 +113,7 @@ public static function swaggerFormats() protected static $setters = [ 'url' => 'setUrl', 'description' => 'setDescription', - 'events' => 'setEvents', - 'domain' => 'setDomain' + 'events' => 'setEvents' ]; /** @@ -128,8 +124,7 @@ public static function swaggerFormats() protected static $getters = [ 'url' => 'getUrl', 'description' => 'getDescription', - 'events' => 'getEvents', - 'domain' => 'getDomain' + 'events' => 'getEvents' ]; /** @@ -173,7 +168,6 @@ public function getModelName() return self::$swaggerModelName; } - const EVENTS_SENT = 'sent'; const EVENTS_HARD_BOUNCE = 'hardBounce'; const EVENTS_SOFT_BOUNCE = 'softBounce'; const EVENTS_BLOCKED = 'blocked'; @@ -189,7 +183,6 @@ public function getModelName() const EVENTS_LIST_ADDITION = 'listAddition'; const EVENTS_CONTACT_UPDATED = 'contactUpdated'; const EVENTS_CONTACT_DELETED = 'contactDeleted'; - const EVENTS_INBOUND_EMAIL_PROCESSED = 'inboundEmailProcessed'; @@ -201,7 +194,6 @@ public function getModelName() public function getEventsAllowableValues() { return [ - self::EVENTS_SENT, self::EVENTS_HARD_BOUNCE, self::EVENTS_SOFT_BOUNCE, self::EVENTS_BLOCKED, @@ -217,7 +209,6 @@ public function getEventsAllowableValues() self::EVENTS_LIST_ADDITION, self::EVENTS_CONTACT_UPDATED, self::EVENTS_CONTACT_DELETED, - self::EVENTS_INBOUND_EMAIL_PROCESSED, ]; } @@ -240,7 +231,6 @@ public function __construct(array $data = null) $this->container['url'] = isset($data['url']) ? $data['url'] : null; $this->container['description'] = isset($data['description']) ? $data['description'] : null; $this->container['events'] = isset($data['events']) ? $data['events'] : null; - $this->container['domain'] = isset($data['domain']) ? $data['domain'] : null; } /** @@ -328,7 +318,7 @@ public function getEvents() /** * Sets events * - * @param string[] $events - Events triggering the webhook. Possible values for **Transactional** type webhook: #### `sent` OR `request`, `delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and `unsubscribed` - Possible values for **Marketing** type webhook: #### `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`, `listAddition` & `delivered` - Possible values for **Inbound** type webhook: #### `inboundEmailProcessed` + * @param string[] $events Events triggering the webhook. Possible values for Transactional type webhook – `sent` OR `request`, `delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and `unsubscribed` and possible values for Marketing type webhook – `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`, `listAddition` and `delivered` * * @return $this */ @@ -347,30 +337,6 @@ public function setEvents($events) return $this; } - - /** - * Gets domain - * - * @return string - */ - public function getDomain() - { - return $this->container['domain']; - } - - /** - * Sets domain - * - * @param string $domain Inbound domain of webhook, used in case of event type `inbound` - * - * @return $this - */ - public function setDomain($domain) - { - $this->container['domain'] = $domain; - - return $this; - } /** * Returns true if offset exists. False otherwise. * @@ -378,6 +344,7 @@ public function setDomain($domain) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -390,6 +357,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -403,6 +371,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -419,6 +388,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/Model/UploadImageToGallery.php b/lib/Model/UploadImageToGallery.php index 3272c349..ae3e8dd3 100644 --- a/lib/Model/UploadImageToGallery.php +++ b/lib/Model/UploadImageToGallery.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /** @@ -57,7 +57,7 @@ class UploadImageToGallery implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'imageUrl' => 'string', + 'image_url' => 'string', 'name' => 'string' ]; @@ -67,7 +67,7 @@ class UploadImageToGallery implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'imageUrl' => null, + 'image_url' => null, 'name' => null ]; @@ -98,7 +98,7 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'imageUrl' => 'imageUrl', + 'image_url' => 'imageUrl', 'name' => 'name' ]; @@ -108,7 +108,7 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'imageUrl' => 'setImageUrl', + 'image_url' => 'setImageUrl', 'name' => 'setName' ]; @@ -118,7 +118,7 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'imageUrl' => 'getImageUrl', + 'image_url' => 'getImageUrl', 'name' => 'getName' ]; @@ -182,7 +182,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['imageUrl'] = isset($data['imageUrl']) ? $data['imageUrl'] : null; + $this->container['image_url'] = isset($data['image_url']) ? $data['image_url'] : null; $this->container['name'] = isset($data['name']) ? $data['name'] : null; } @@ -195,8 +195,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['imageUrl'] === null) { - $invalidProperties[] = "'imageUrl' can't be null"; + if ($this->container['image_url'] === null) { + $invalidProperties[] = "'image_url' can't be null"; } return $invalidProperties; } @@ -214,25 +214,25 @@ public function valid() /** - * Gets imageUrl + * Gets image_url * * @return string */ public function getImageUrl() { - return $this->container['imageUrl']; + return $this->container['image_url']; } /** - * Sets imageUrl + * Sets image_url * - * @param string $imageUrl The absolute url of the image (no local file). Maximum allowed size for image is 2MB. Allowed extensions for images are - jpeg, jpg, png, bmp, gif. + * @param string $image_url The absolute url of the image (no local file). Maximum allowed size for image is 2MB. Allowed extensions for images are - jpeg, jpg, png, bmp, gif. * * @return $this */ - public function setImageUrl($imageUrl) + public function setImageUrl($image_url) { - $this->container['imageUrl'] = $imageUrl; + $this->container['image_url'] = $image_url; return $this; } @@ -267,6 +267,7 @@ public function setName($name) * * @return boolean */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); @@ -279,6 +280,7 @@ public function offsetExists($offset) * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; @@ -292,6 +294,7 @@ public function offsetGet($offset) * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (is_null($offset)) { @@ -308,6 +311,7 @@ public function offsetSet($offset, $value) * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); diff --git a/lib/ObjectSerializer.php b/lib/ObjectSerializer.php index 4a677abe..a863182e 100644 --- a/lib/ObjectSerializer.php +++ b/lib/ObjectSerializer.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.19 + * Swagger Codegen version: 2.4.30-SNAPSHOT */ /**