Import legacy nurinda.co.id website

This commit is contained in:
dirga committed 2026-10-01 14:27:19 +07:00
1 parent 3f59bb9038
commit 6e21646ac4
13389 files changed
+3246690

No files matched your search

@@ -0,0 +1,272 @@
<?php
/**
* AccountApi
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Api;
use WPMailSMTP\Vendor\GuzzleHttp\Client;
use WPMailSMTP\Vendor\GuzzleHttp\ClientInterface;
use WPMailSMTP\Vendor\GuzzleHttp\Exception\RequestException;
use WPMailSMTP\Vendor\GuzzleHttp\Psr7\MultipartStream;
use WPMailSMTP\Vendor\GuzzleHttp\Psr7\Request;
use WPMailSMTP\Vendor\GuzzleHttp\RequestOptions;
use WPMailSMTP\Vendor\SendinBlue\Client\ApiException;
use WPMailSMTP\Vendor\SendinBlue\Client\Configuration;
use WPMailSMTP\Vendor\SendinBlue\Client\HeaderSelector;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* AccountApi Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class AccountApi
{
/**
* @var ClientInterface
*/
protected $client;
/**
* @var Configuration
*/
protected $config;
/**
* @var HeaderSelector
*/
protected $headerSelector;
/**
* @param ClientInterface $client
* @param Configuration $config
* @param HeaderSelector $selector
*/
public function __construct(\WPMailSMTP\Vendor\GuzzleHttp\ClientInterface $client = null, \WPMailSMTP\Vendor\SendinBlue\Client\Configuration $config = null, \WPMailSMTP\Vendor\SendinBlue\Client\HeaderSelector $selector = null)
{
$this->client = $client ?: new \WPMailSMTP\Vendor\GuzzleHttp\Client();
$this->config = $config ?: new \WPMailSMTP\Vendor\SendinBlue\Client\Configuration();
$this->headerSelector = $selector ?: new \WPMailSMTP\Vendor\SendinBlue\Client\HeaderSelector();
}
/**
* @return Configuration
*/
public function getConfig()
{
return $this->config;
}
/**
* Operation getAccount
*
* Get your account information, plan and credits details
*
*
* @throws \SendinBlue\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return \SendinBlue\Client\Model\GetAccount
*/
public function getAccount()
{
list($response) = $this->getAccountWithHttpInfo();
return $response;
}
/**
* Operation getAccountWithHttpInfo
*
* Get your account information, plan and credits details
*
*
* @throws \SendinBlue\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return array of \SendinBlue\Client\Model\GetAccount, HTTP status code, HTTP response headers (array of strings)
*/
public function getAccountWithHttpInfo()
{
$returnType = 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetAccount';
$request = $this->getAccountRequest();
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (\WPMailSMTP\Vendor\GuzzleHttp\Exception\RequestException $e) {
throw new \WPMailSMTP\Vendor\SendinBlue\Client\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 \WPMailSMTP\Vendor\SendinBlue\Client\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 [\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders()];
} catch (\WPMailSMTP\Vendor\SendinBlue\Client\ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetAccount', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
throw $e;
}
}
/**
* Operation getAccountAsync
*
* Get your account information, plan and credits details
*
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function getAccountAsync()
{
return $this->getAccountAsyncWithHttpInfo()->then(function ($response) {
return $response[0];
});
}
/**
* Operation getAccountAsyncWithHttpInfo
*
* Get your account information, plan and credits details
*
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function getAccountAsyncWithHttpInfo()
{
$returnType = 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetAccount';
$request = $this->getAccountRequest();
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 [\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders()];
}, function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new \WPMailSMTP\Vendor\SendinBlue\Client\ApiException(\sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), $response->getBody());
});
}
/**
* Create request for operation 'getAccount'
*
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
protected function getAccountRequest()
{
$resourcePath = '/account';
$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 = \WPMailSMTP\Vendor\GuzzleHttp\json_encode($httpBody);
}
// array has no __toString(), so we should encode it manually
if (\is_array($httpBody)) {
$httpBody = \WPMailSMTP\Vendor\GuzzleHttp\json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\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 \WPMailSMTP\Vendor\GuzzleHttp\Psr7\MultipartStream($multipartContents);
} elseif ($headers['Content-Type'] === 'application/json') {
$httpBody = \WPMailSMTP\Vendor\GuzzleHttp\json_encode($formParams);
} else {
// for HTTP post (form)
$httpBody = \WPMailSMTP\Vendor\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 = \WPMailSMTP\Vendor\GuzzleHttp\Psr7\Query::build($queryParams);
return new \WPMailSMTP\Vendor\GuzzleHttp\Psr7\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[\WPMailSMTP\Vendor\GuzzleHttp\RequestOptions::DEBUG] = \fopen($this->config->getDebugFile(), 'a');
if (!$options[\WPMailSMTP\Vendor\GuzzleHttp\RequestOptions::DEBUG]) {
throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile());
}
}
return $options;
}
}
@@ -0,0 +1,847 @@
<?php
/**
* AttributesApi
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Api;
use WPMailSMTP\Vendor\GuzzleHttp\Client;
use WPMailSMTP\Vendor\GuzzleHttp\ClientInterface;
use WPMailSMTP\Vendor\GuzzleHttp\Exception\RequestException;
use WPMailSMTP\Vendor\GuzzleHttp\Psr7\MultipartStream;
use WPMailSMTP\Vendor\GuzzleHttp\Psr7\Request;
use WPMailSMTP\Vendor\GuzzleHttp\RequestOptions;
use WPMailSMTP\Vendor\SendinBlue\Client\ApiException;
use WPMailSMTP\Vendor\SendinBlue\Client\Configuration;
use WPMailSMTP\Vendor\SendinBlue\Client\HeaderSelector;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* AttributesApi Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class AttributesApi
{
/**
* @var ClientInterface
*/
protected $client;
/**
* @var Configuration
*/
protected $config;
/**
* @var HeaderSelector
*/
protected $headerSelector;
/**
* @param ClientInterface $client
* @param Configuration $config
* @param HeaderSelector $selector
*/
public function __construct(\WPMailSMTP\Vendor\GuzzleHttp\ClientInterface $client = null, \WPMailSMTP\Vendor\SendinBlue\Client\Configuration $config = null, \WPMailSMTP\Vendor\SendinBlue\Client\HeaderSelector $selector = null)
{
$this->client = $client ?: new \WPMailSMTP\Vendor\GuzzleHttp\Client();
$this->config = $config ?: new \WPMailSMTP\Vendor\SendinBlue\Client\Configuration();
$this->headerSelector = $selector ?: new \WPMailSMTP\Vendor\SendinBlue\Client\HeaderSelector();
}
/**
* @return Configuration
*/
public function getConfig()
{
return $this->config;
}
/**
* Operation createAttribute
*
* 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)
*
* @throws \SendinBlue\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return void
*/
public function createAttribute($attributeCategory, $attributeName, $createAttribute)
{
$this->createAttributeWithHttpInfo($attributeCategory, $attributeName, $createAttribute);
}
/**
* Operation createAttributeWithHttpInfo
*
* 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)
*
* @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)
{
$returnType = '';
$request = $this->createAttributeRequest($attributeCategory, $attributeName, $createAttribute);
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (\WPMailSMTP\Vendor\GuzzleHttp\Exception\RequestException $e) {
throw new \WPMailSMTP\Vendor\SendinBlue\Client\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 \WPMailSMTP\Vendor\SendinBlue\Client\ApiException(\sprintf('[%d] Error connecting to the API (%s)', $statusCode, $request->getUri()), $statusCode, $response->getHeaders(), $response->getBody());
}
return [null, $statusCode, $response->getHeaders()];
} catch (\WPMailSMTP\Vendor\SendinBlue\Client\ApiException $e) {
switch ($e->getCode()) {
case 400:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\ErrorModel', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
throw $e;
}
}
/**
* Operation createAttributeAsync
*
* 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)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function createAttributeAsync($attributeCategory, $attributeName, $createAttribute)
{
return $this->createAttributeAsyncWithHttpInfo($attributeCategory, $attributeName, $createAttribute)->then(function ($response) {
return $response[0];
});
}
/**
* Operation createAttributeAsyncWithHttpInfo
*
* 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)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function createAttributeAsyncWithHttpInfo($attributeCategory, $attributeName, $createAttribute)
{
$returnType = '';
$request = $this->createAttributeRequest($attributeCategory, $attributeName, $createAttribute);
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 \WPMailSMTP\Vendor\SendinBlue\Client\ApiException(\sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), $response->getBody());
});
}
/**
* 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)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
protected function createAttributeRequest($attributeCategory, $attributeName, $createAttribute)
{
// verify the required parameter 'attributeCategory' is set
if ($attributeCategory === null || \is_array($attributeCategory) && \count($attributeCategory) === 0) {
throw new \InvalidArgumentException('Missing the required parameter $attributeCategory when calling createAttribute');
}
// verify the required parameter 'attributeName' is set
if ($attributeName === null || \is_array($attributeName) && \count($attributeName) === 0) {
throw new \InvalidArgumentException('Missing the required parameter $attributeName when calling createAttribute');
}
// verify the required parameter 'createAttribute' is set
if ($createAttribute === null || \is_array($createAttribute) && \count($createAttribute) === 0) {
throw new \InvalidArgumentException('Missing the required parameter $createAttribute when calling createAttribute');
}
$resourcePath = '/contacts/attributes/{attributeCategory}/{attributeName}';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = \false;
// path params
if ($attributeCategory !== null) {
$resourcePath = \str_replace('{' . 'attributeCategory' . '}', \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toPathValue($attributeCategory), $resourcePath);
}
// path params
if ($attributeName !== null) {
$resourcePath = \str_replace('{' . 'attributeName' . '}', \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toPathValue($attributeName), $resourcePath);
}
// body params
$_tempBody = null;
if (isset($createAttribute)) {
$_tempBody = $createAttribute;
}
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 = \WPMailSMTP\Vendor\GuzzleHttp\json_encode($httpBody);
}
// array has no __toString(), so we should encode it manually
if (\is_array($httpBody)) {
$httpBody = \WPMailSMTP\Vendor\GuzzleHttp\json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\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 \WPMailSMTP\Vendor\GuzzleHttp\Psr7\MultipartStream($multipartContents);
} elseif ($headers['Content-Type'] === 'application/json') {
$httpBody = \WPMailSMTP\Vendor\GuzzleHttp\json_encode($formParams);
} else {
// for HTTP post (form)
$httpBody = \WPMailSMTP\Vendor\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 = \WPMailSMTP\Vendor\GuzzleHttp\Psr7\Query::build($queryParams);
return new \WPMailSMTP\Vendor\GuzzleHttp\Psr7\Request('POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody);
}
/**
* Operation deleteAttribute
*
* Delete an attribute
*
* @param string $attributeCategory Category of the attribute (required)
* @param string $attributeName Name of the existing attribute (required)
*
* @throws \SendinBlue\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return void
*/
public function deleteAttribute($attributeCategory, $attributeName)
{
$this->deleteAttributeWithHttpInfo($attributeCategory, $attributeName);
}
/**
* Operation deleteAttributeWithHttpInfo
*
* Delete an attribute
*
* @param string $attributeCategory Category of the attribute (required)
* @param string $attributeName 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)
{
$returnType = '';
$request = $this->deleteAttributeRequest($attributeCategory, $attributeName);
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (\WPMailSMTP\Vendor\GuzzleHttp\Exception\RequestException $e) {
throw new \WPMailSMTP\Vendor\SendinBlue\Client\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 \WPMailSMTP\Vendor\SendinBlue\Client\ApiException(\sprintf('[%d] Error connecting to the API (%s)', $statusCode, $request->getUri()), $statusCode, $response->getHeaders(), $response->getBody());
}
return [null, $statusCode, $response->getHeaders()];
} catch (\WPMailSMTP\Vendor\SendinBlue\Client\ApiException $e) {
switch ($e->getCode()) {
case 400:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\ErrorModel', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 404:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\ErrorModel', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
throw $e;
}
}
/**
* Operation deleteAttributeAsync
*
* Delete an attribute
*
* @param string $attributeCategory Category of the attribute (required)
* @param string $attributeName Name of the existing attribute (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function deleteAttributeAsync($attributeCategory, $attributeName)
{
return $this->deleteAttributeAsyncWithHttpInfo($attributeCategory, $attributeName)->then(function ($response) {
return $response[0];
});
}
/**
* Operation deleteAttributeAsyncWithHttpInfo
*
* Delete an attribute
*
* @param string $attributeCategory Category of the attribute (required)
* @param string $attributeName Name of the existing attribute (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function deleteAttributeAsyncWithHttpInfo($attributeCategory, $attributeName)
{
$returnType = '';
$request = $this->deleteAttributeRequest($attributeCategory, $attributeName);
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 \WPMailSMTP\Vendor\SendinBlue\Client\ApiException(\sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), $response->getBody());
});
}
/**
* Create request for operation 'deleteAttribute'
*
* @param string $attributeCategory Category of the attribute (required)
* @param string $attributeName Name of the existing attribute (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
protected function deleteAttributeRequest($attributeCategory, $attributeName)
{
// verify the required parameter 'attributeCategory' is set
if ($attributeCategory === null || \is_array($attributeCategory) && \count($attributeCategory) === 0) {
throw new \InvalidArgumentException('Missing the required parameter $attributeCategory when calling deleteAttribute');
}
// verify the required parameter 'attributeName' is set
if ($attributeName === null || \is_array($attributeName) && \count($attributeName) === 0) {
throw new \InvalidArgumentException('Missing the required parameter $attributeName when calling deleteAttribute');
}
$resourcePath = '/contacts/attributes/{attributeCategory}/{attributeName}';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = \false;
// path params
if ($attributeCategory !== null) {
$resourcePath = \str_replace('{' . 'attributeCategory' . '}', \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toPathValue($attributeCategory), $resourcePath);
}
// path params
if ($attributeName !== null) {
$resourcePath = \str_replace('{' . 'attributeName' . '}', \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toPathValue($attributeName), $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 = \WPMailSMTP\Vendor\GuzzleHttp\json_encode($httpBody);
}
// array has no __toString(), so we should encode it manually
if (\is_array($httpBody)) {
$httpBody = \WPMailSMTP\Vendor\GuzzleHttp\json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\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 \WPMailSMTP\Vendor\GuzzleHttp\Psr7\MultipartStream($multipartContents);
} elseif ($headers['Content-Type'] === 'application/json') {
$httpBody = \WPMailSMTP\Vendor\GuzzleHttp\json_encode($formParams);
} else {
// for HTTP post (form)
$httpBody = \WPMailSMTP\Vendor\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 = \WPMailSMTP\Vendor\GuzzleHttp\Psr7\Query::build($queryParams);
return new \WPMailSMTP\Vendor\GuzzleHttp\Psr7\Request('DELETE', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody);
}
/**
* Operation getAttributes
*
* List all attributes
*
*
* @throws \SendinBlue\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return \SendinBlue\Client\Model\GetAttributes
*/
public function getAttributes()
{
list($response) = $this->getAttributesWithHttpInfo();
return $response;
}
/**
* Operation getAttributesWithHttpInfo
*
* List all attributes
*
*
* @throws \SendinBlue\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return array of \SendinBlue\Client\Model\GetAttributes, HTTP status code, HTTP response headers (array of strings)
*/
public function getAttributesWithHttpInfo()
{
$returnType = 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetAttributes';
$request = $this->getAttributesRequest();
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (\WPMailSMTP\Vendor\GuzzleHttp\Exception\RequestException $e) {
throw new \WPMailSMTP\Vendor\SendinBlue\Client\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 \WPMailSMTP\Vendor\SendinBlue\Client\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 [\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders()];
} catch (\WPMailSMTP\Vendor\SendinBlue\Client\ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetAttributes', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
throw $e;
}
}
/**
* Operation getAttributesAsync
*
* List all attributes
*
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function getAttributesAsync()
{
return $this->getAttributesAsyncWithHttpInfo()->then(function ($response) {
return $response[0];
});
}
/**
* Operation getAttributesAsyncWithHttpInfo
*
* List all attributes
*
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function getAttributesAsyncWithHttpInfo()
{
$returnType = 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetAttributes';
$request = $this->getAttributesRequest();
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 [\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders()];
}, function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new \WPMailSMTP\Vendor\SendinBlue\Client\ApiException(\sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), $response->getBody());
});
}
/**
* Create request for operation 'getAttributes'
*
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
protected function getAttributesRequest()
{
$resourcePath = '/contacts/attributes';
$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 = \WPMailSMTP\Vendor\GuzzleHttp\json_encode($httpBody);
}
// array has no __toString(), so we should encode it manually
if (\is_array($httpBody)) {
$httpBody = \WPMailSMTP\Vendor\GuzzleHttp\json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\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 \WPMailSMTP\Vendor\GuzzleHttp\Psr7\MultipartStream($multipartContents);
} elseif ($headers['Content-Type'] === 'application/json') {
$httpBody = \WPMailSMTP\Vendor\GuzzleHttp\json_encode($formParams);
} else {
// for HTTP post (form)
$httpBody = \WPMailSMTP\Vendor\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 = \WPMailSMTP\Vendor\GuzzleHttp\Psr7\Query::build($queryParams);
return new \WPMailSMTP\Vendor\GuzzleHttp\Psr7\Request('GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody);
}
/**
* Operation updateAttribute
*
* 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)
*
* @throws \SendinBlue\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return void
*/
public function updateAttribute($attributeCategory, $attributeName, $updateAttribute)
{
$this->updateAttributeWithHttpInfo($attributeCategory, $attributeName, $updateAttribute);
}
/**
* Operation updateAttributeWithHttpInfo
*
* 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)
*
* @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)
{
$returnType = '';
$request = $this->updateAttributeRequest($attributeCategory, $attributeName, $updateAttribute);
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (\WPMailSMTP\Vendor\GuzzleHttp\Exception\RequestException $e) {
throw new \WPMailSMTP\Vendor\SendinBlue\Client\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 \WPMailSMTP\Vendor\SendinBlue\Client\ApiException(\sprintf('[%d] Error connecting to the API (%s)', $statusCode, $request->getUri()), $statusCode, $response->getHeaders(), $response->getBody());
}
return [null, $statusCode, $response->getHeaders()];
} catch (\WPMailSMTP\Vendor\SendinBlue\Client\ApiException $e) {
switch ($e->getCode()) {
case 400:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\ErrorModel', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 404:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\ErrorModel', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
throw $e;
}
}
/**
* Operation updateAttributeAsync
*
* 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)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function updateAttributeAsync($attributeCategory, $attributeName, $updateAttribute)
{
return $this->updateAttributeAsyncWithHttpInfo($attributeCategory, $attributeName, $updateAttribute)->then(function ($response) {
return $response[0];
});
}
/**
* Operation updateAttributeAsyncWithHttpInfo
*
* 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)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function updateAttributeAsyncWithHttpInfo($attributeCategory, $attributeName, $updateAttribute)
{
$returnType = '';
$request = $this->updateAttributeRequest($attributeCategory, $attributeName, $updateAttribute);
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 \WPMailSMTP\Vendor\SendinBlue\Client\ApiException(\sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), $response->getBody());
});
}
/**
* 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)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
protected function updateAttributeRequest($attributeCategory, $attributeName, $updateAttribute)
{
// verify the required parameter 'attributeCategory' is set
if ($attributeCategory === null || \is_array($attributeCategory) && \count($attributeCategory) === 0) {
throw new \InvalidArgumentException('Missing the required parameter $attributeCategory when calling updateAttribute');
}
// verify the required parameter 'attributeName' is set
if ($attributeName === null || \is_array($attributeName) && \count($attributeName) === 0) {
throw new \InvalidArgumentException('Missing the required parameter $attributeName when calling updateAttribute');
}
// verify the required parameter 'updateAttribute' is set
if ($updateAttribute === null || \is_array($updateAttribute) && \count($updateAttribute) === 0) {
throw new \InvalidArgumentException('Missing the required parameter $updateAttribute when calling updateAttribute');
}
$resourcePath = '/contacts/attributes/{attributeCategory}/{attributeName}';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = \false;
// path params
if ($attributeCategory !== null) {
$resourcePath = \str_replace('{' . 'attributeCategory' . '}', \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toPathValue($attributeCategory), $resourcePath);
}
// path params
if ($attributeName !== null) {
$resourcePath = \str_replace('{' . 'attributeName' . '}', \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toPathValue($attributeName), $resourcePath);
}
// body params
$_tempBody = null;
if (isset($updateAttribute)) {
$_tempBody = $updateAttribute;
}
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 = \WPMailSMTP\Vendor\GuzzleHttp\json_encode($httpBody);
}
// array has no __toString(), so we should encode it manually
if (\is_array($httpBody)) {
$httpBody = \WPMailSMTP\Vendor\GuzzleHttp\json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\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 \WPMailSMTP\Vendor\GuzzleHttp\Psr7\MultipartStream($multipartContents);
} elseif ($headers['Content-Type'] === 'application/json') {
$httpBody = \WPMailSMTP\Vendor\GuzzleHttp\json_encode($formParams);
} else {
// for HTTP post (form)
$httpBody = \WPMailSMTP\Vendor\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 = \WPMailSMTP\Vendor\GuzzleHttp\Psr7\Query::build($queryParams);
return new \WPMailSMTP\Vendor\GuzzleHttp\Psr7\Request('PUT', $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[\WPMailSMTP\Vendor\GuzzleHttp\RequestOptions::DEBUG] = \fopen($this->config->getDebugFile(), 'a');
if (!$options[\WPMailSMTP\Vendor\GuzzleHttp\RequestOptions::DEBUG]) {
throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile());
}
}
return $options;
}
}
@@ -0,0 +1,726 @@
<?php
/**
* InboundParsingApi
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Api;
use WPMailSMTP\Vendor\GuzzleHttp\Client;
use WPMailSMTP\Vendor\GuzzleHttp\ClientInterface;
use WPMailSMTP\Vendor\GuzzleHttp\Exception\RequestException;
use WPMailSMTP\Vendor\GuzzleHttp\Psr7\MultipartStream;
use WPMailSMTP\Vendor\GuzzleHttp\Psr7\Request;
use WPMailSMTP\Vendor\GuzzleHttp\RequestOptions;
use WPMailSMTP\Vendor\SendinBlue\Client\ApiException;
use WPMailSMTP\Vendor\SendinBlue\Client\Configuration;
use WPMailSMTP\Vendor\SendinBlue\Client\HeaderSelector;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* InboundParsingApi Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class InboundParsingApi
{
/**
* @var ClientInterface
*/
protected $client;
/**
* @var Configuration
*/
protected $config;
/**
* @var HeaderSelector
*/
protected $headerSelector;
/**
* @param ClientInterface $client
* @param Configuration $config
* @param HeaderSelector $selector
*/
public function __construct(\WPMailSMTP\Vendor\GuzzleHttp\ClientInterface $client = null, \WPMailSMTP\Vendor\SendinBlue\Client\Configuration $config = null, \WPMailSMTP\Vendor\SendinBlue\Client\HeaderSelector $selector = null)
{
$this->client = $client ?: new \WPMailSMTP\Vendor\GuzzleHttp\Client();
$this->config = $config ?: new \WPMailSMTP\Vendor\SendinBlue\Client\Configuration();
$this->headerSelector = $selector ?: new \WPMailSMTP\Vendor\SendinBlue\Client\HeaderSelector();
}
/**
* @return Configuration
*/
public function getConfig()
{
return $this->config;
}
/**
* Operation getInboundEmailAttachment
*
* Retrieve inbound attachment with download token.
*
* @param string $downloadToken Token to fetch a particular attachment (required)
*
* @throws \SendinBlue\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return \SplFileObject
*/
public function getInboundEmailAttachment($downloadToken)
{
list($response) = $this->getInboundEmailAttachmentWithHttpInfo($downloadToken);
return $response;
}
/**
* Operation getInboundEmailAttachmentWithHttpInfo
*
* Retrieve inbound attachment with download token.
*
* @param string $downloadToken Token to fetch a particular attachment (required)
*
* @throws \SendinBlue\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return array of \SplFileObject, HTTP status code, HTTP response headers (array of strings)
*/
public function getInboundEmailAttachmentWithHttpInfo($downloadToken)
{
$returnType = '\\SplFileObject';
$request = $this->getInboundEmailAttachmentRequest($downloadToken);
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (\WPMailSMTP\Vendor\GuzzleHttp\Exception\RequestException $e) {
throw new \WPMailSMTP\Vendor\SendinBlue\Client\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 \WPMailSMTP\Vendor\SendinBlue\Client\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 [\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders()];
} catch (\WPMailSMTP\Vendor\SendinBlue\Client\ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\\SplFileObject', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 400:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\ErrorModel', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 404:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\ErrorModel', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
throw $e;
}
}
/**
* Operation getInboundEmailAttachmentAsync
*
* Retrieve inbound attachment with download token.
*
* @param string $downloadToken Token to fetch a particular attachment (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function getInboundEmailAttachmentAsync($downloadToken)
{
return $this->getInboundEmailAttachmentAsyncWithHttpInfo($downloadToken)->then(function ($response) {
return $response[0];
});
}
/**
* Operation getInboundEmailAttachmentAsyncWithHttpInfo
*
* Retrieve inbound attachment with download token.
*
* @param string $downloadToken Token to fetch a particular attachment (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function getInboundEmailAttachmentAsyncWithHttpInfo($downloadToken)
{
$returnType = '\\SplFileObject';
$request = $this->getInboundEmailAttachmentRequest($downloadToken);
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 [\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders()];
}, function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new \WPMailSMTP\Vendor\SendinBlue\Client\ApiException(\sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), $response->getBody());
});
}
/**
* Create request for operation 'getInboundEmailAttachment'
*
* @param string $downloadToken Token to fetch a particular attachment (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
protected function getInboundEmailAttachmentRequest($downloadToken)
{
// verify the required parameter 'downloadToken' is set
if ($downloadToken === null || \is_array($downloadToken) && \count($downloadToken) === 0) {
throw new \InvalidArgumentException('Missing the required parameter $downloadToken when calling getInboundEmailAttachment');
}
$resourcePath = '/inbound/attachments/{downloadToken}';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = \false;
// path params
if ($downloadToken !== null) {
$resourcePath = \str_replace('{' . 'downloadToken' . '}', \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toPathValue($downloadToken), $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 = \WPMailSMTP\Vendor\GuzzleHttp\json_encode($httpBody);
}
// array has no __toString(), so we should encode it manually
if (\is_array($httpBody)) {
$httpBody = \WPMailSMTP\Vendor\GuzzleHttp\json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\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 \WPMailSMTP\Vendor\GuzzleHttp\Psr7\MultipartStream($multipartContents);
} elseif ($headers['Content-Type'] === 'application/json') {
$httpBody = \WPMailSMTP\Vendor\GuzzleHttp\json_encode($formParams);
} else {
// for HTTP post (form)
$httpBody = \WPMailSMTP\Vendor\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 = \WPMailSMTP\Vendor\GuzzleHttp\Psr7\Query::build($queryParams);
return new \WPMailSMTP\Vendor\GuzzleHttp\Psr7\Request('GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody);
}
/**
* 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 = 'WPMailSMTP\\Vendor\\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 (\WPMailSMTP\Vendor\GuzzleHttp\Exception\RequestException $e) {
throw new \WPMailSMTP\Vendor\SendinBlue\Client\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 \WPMailSMTP\Vendor\SendinBlue\Client\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 [\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders()];
} catch (\WPMailSMTP\Vendor\SendinBlue\Client\ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetInboundEmailEvents', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 400:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'WPMailSMTP\\Vendor\\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 = 'WPMailSMTP\\Vendor\\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 [\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders()];
}, function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new \WPMailSMTP\Vendor\SendinBlue\Client\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.');
}
if ($limit !== null && $limit < 0) {
throw new \InvalidArgumentException('invalid value for "$limit" when calling InboundParsingApi.getInboundEmailEvents, must be bigger than or equal to 0.');
}
$resourcePath = '/inbound/events';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = \false;
// query params
if ($sender !== null) {
$queryParams['sender'] = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toQueryValue($sender);
}
// query params
if ($startDate !== null) {
$queryParams['startDate'] = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toQueryValue($startDate);
}
// query params
if ($endDate !== null) {
$queryParams['endDate'] = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toQueryValue($endDate);
}
// query params
if ($limit !== null) {
$queryParams['limit'] = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toQueryValue($limit);
}
// query params
if ($offset !== null) {
$queryParams['offset'] = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toQueryValue($offset);
}
// query params
if ($sort !== null) {
$queryParams['sort'] = \WPMailSMTP\Vendor\SendinBlue\Client\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 = \WPMailSMTP\Vendor\GuzzleHttp\json_encode($httpBody);
}
// array has no __toString(), so we should encode it manually
if (\is_array($httpBody)) {
$httpBody = \WPMailSMTP\Vendor\GuzzleHttp\json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\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 \WPMailSMTP\Vendor\GuzzleHttp\Psr7\MultipartStream($multipartContents);
} elseif ($headers['Content-Type'] === 'application/json') {
$httpBody = \WPMailSMTP\Vendor\GuzzleHttp\json_encode($formParams);
} else {
// for HTTP post (form)
$httpBody = \WPMailSMTP\Vendor\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 = \WPMailSMTP\Vendor\GuzzleHttp\Psr7\Query::build($queryParams);
return new \WPMailSMTP\Vendor\GuzzleHttp\Psr7\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 = 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetInboundEmailEventsByUuid';
$request = $this->getInboundEmailEventsByUuidRequest($uuid);
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (\WPMailSMTP\Vendor\GuzzleHttp\Exception\RequestException $e) {
throw new \WPMailSMTP\Vendor\SendinBlue\Client\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 \WPMailSMTP\Vendor\SendinBlue\Client\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 [\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders()];
} catch (\WPMailSMTP\Vendor\SendinBlue\Client\ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetInboundEmailEventsByUuid', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 400:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'WPMailSMTP\\Vendor\\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 = 'WPMailSMTP\\Vendor\\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 [\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders()];
}, function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new \WPMailSMTP\Vendor\SendinBlue\Client\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' . '}', \WPMailSMTP\Vendor\SendinBlue\Client\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 = \WPMailSMTP\Vendor\GuzzleHttp\json_encode($httpBody);
}
// array has no __toString(), so we should encode it manually
if (\is_array($httpBody)) {
$httpBody = \WPMailSMTP\Vendor\GuzzleHttp\json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\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 \WPMailSMTP\Vendor\GuzzleHttp\Psr7\MultipartStream($multipartContents);
} elseif ($headers['Content-Type'] === 'application/json') {
$httpBody = \WPMailSMTP\Vendor\GuzzleHttp\json_encode($formParams);
} else {
// for HTTP post (form)
$httpBody = \WPMailSMTP\Vendor\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 = \WPMailSMTP\Vendor\GuzzleHttp\Psr7\Query::build($queryParams);
return new \WPMailSMTP\Vendor\GuzzleHttp\Psr7\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[\WPMailSMTP\Vendor\GuzzleHttp\RequestOptions::DEBUG] = \fopen($this->config->getDebugFile(), 'a');
if (!$options[\WPMailSMTP\Vendor\GuzzleHttp\RequestOptions::DEBUG]) {
throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile());
}
}
return $options;
}
}
@@ -0,0 +1,506 @@
<?php
/**
* ProcessApi
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Api;
use WPMailSMTP\Vendor\GuzzleHttp\Client;
use WPMailSMTP\Vendor\GuzzleHttp\ClientInterface;
use WPMailSMTP\Vendor\GuzzleHttp\Exception\RequestException;
use WPMailSMTP\Vendor\GuzzleHttp\Psr7\MultipartStream;
use WPMailSMTP\Vendor\GuzzleHttp\Psr7\Request;
use WPMailSMTP\Vendor\GuzzleHttp\RequestOptions;
use WPMailSMTP\Vendor\SendinBlue\Client\ApiException;
use WPMailSMTP\Vendor\SendinBlue\Client\Configuration;
use WPMailSMTP\Vendor\SendinBlue\Client\HeaderSelector;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* ProcessApi Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class ProcessApi
{
/**
* @var ClientInterface
*/
protected $client;
/**
* @var Configuration
*/
protected $config;
/**
* @var HeaderSelector
*/
protected $headerSelector;
/**
* @param ClientInterface $client
* @param Configuration $config
* @param HeaderSelector $selector
*/
public function __construct(\WPMailSMTP\Vendor\GuzzleHttp\ClientInterface $client = null, \WPMailSMTP\Vendor\SendinBlue\Client\Configuration $config = null, \WPMailSMTP\Vendor\SendinBlue\Client\HeaderSelector $selector = null)
{
$this->client = $client ?: new \WPMailSMTP\Vendor\GuzzleHttp\Client();
$this->config = $config ?: new \WPMailSMTP\Vendor\SendinBlue\Client\Configuration();
$this->headerSelector = $selector ?: new \WPMailSMTP\Vendor\SendinBlue\Client\HeaderSelector();
}
/**
* @return Configuration
*/
public function getConfig()
{
return $this->config;
}
/**
* Operation getProcess
*
* Return the informations for a process
*
* @param int $processId Id of the process (required)
*
* @throws \SendinBlue\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return \SendinBlue\Client\Model\GetProcess
*/
public function getProcess($processId)
{
list($response) = $this->getProcessWithHttpInfo($processId);
return $response;
}
/**
* Operation getProcessWithHttpInfo
*
* Return the informations for a process
*
* @param int $processId 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)
{
$returnType = 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetProcess';
$request = $this->getProcessRequest($processId);
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (\WPMailSMTP\Vendor\GuzzleHttp\Exception\RequestException $e) {
throw new \WPMailSMTP\Vendor\SendinBlue\Client\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 \WPMailSMTP\Vendor\SendinBlue\Client\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 [\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders()];
} catch (\WPMailSMTP\Vendor\SendinBlue\Client\ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetProcess', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 404:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\ErrorModel', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 400:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\ErrorModel', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
throw $e;
}
}
/**
* Operation getProcessAsync
*
* Return the informations for a process
*
* @param int $processId Id of the process (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function getProcessAsync($processId)
{
return $this->getProcessAsyncWithHttpInfo($processId)->then(function ($response) {
return $response[0];
});
}
/**
* Operation getProcessAsyncWithHttpInfo
*
* Return the informations for a process
*
* @param int $processId Id of the process (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function getProcessAsyncWithHttpInfo($processId)
{
$returnType = 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetProcess';
$request = $this->getProcessRequest($processId);
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 [\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders()];
}, function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new \WPMailSMTP\Vendor\SendinBlue\Client\ApiException(\sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), $response->getBody());
});
}
/**
* Create request for operation 'getProcess'
*
* @param int $processId Id of the process (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
protected function getProcessRequest($processId)
{
// verify the required parameter 'processId' is set
if ($processId === null || \is_array($processId) && \count($processId) === 0) {
throw new \InvalidArgumentException('Missing the required parameter $processId when calling getProcess');
}
$resourcePath = '/processes/{processId}';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = \false;
// path params
if ($processId !== null) {
$resourcePath = \str_replace('{' . 'processId' . '}', \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toPathValue($processId), $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 = \WPMailSMTP\Vendor\GuzzleHttp\json_encode($httpBody);
}
// array has no __toString(), so we should encode it manually
if (\is_array($httpBody)) {
$httpBody = \WPMailSMTP\Vendor\GuzzleHttp\json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\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 \WPMailSMTP\Vendor\GuzzleHttp\Psr7\MultipartStream($multipartContents);
} elseif ($headers['Content-Type'] === 'application/json') {
$httpBody = \WPMailSMTP\Vendor\GuzzleHttp\json_encode($formParams);
} else {
// for HTTP post (form)
$httpBody = \WPMailSMTP\Vendor\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 = \WPMailSMTP\Vendor\GuzzleHttp\Psr7\Query::build($queryParams);
return new \WPMailSMTP\Vendor\GuzzleHttp\Psr7\Request('GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody);
}
/**
* Operation getProcesses
*
* Return all the processes for your account
*
* @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 &#x60;sort&#x60; 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')
{
list($response) = $this->getProcessesWithHttpInfo($limit, $offset, $sort);
return $response;
}
/**
* Operation getProcessesWithHttpInfo
*
* Return all the processes for your account
*
* @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 &#x60;sort&#x60; 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')
{
$returnType = 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetProcesses';
$request = $this->getProcessesRequest($limit, $offset, $sort);
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (\WPMailSMTP\Vendor\GuzzleHttp\Exception\RequestException $e) {
throw new \WPMailSMTP\Vendor\SendinBlue\Client\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 \WPMailSMTP\Vendor\SendinBlue\Client\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 [\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders()];
} catch (\WPMailSMTP\Vendor\SendinBlue\Client\ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetProcesses', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 400:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\ErrorModel', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
throw $e;
}
}
/**
* Operation getProcessesAsync
*
* Return all the processes for your account
*
* @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 &#x60;sort&#x60; is not passed (optional, default to desc)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function getProcessesAsync($limit = '10', $offset = '0', $sort = 'desc')
{
return $this->getProcessesAsyncWithHttpInfo($limit, $offset, $sort)->then(function ($response) {
return $response[0];
});
}
/**
* Operation getProcessesAsyncWithHttpInfo
*
* Return all the processes for your account
*
* @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 &#x60;sort&#x60; is not passed (optional, default to desc)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function getProcessesAsyncWithHttpInfo($limit = '10', $offset = '0', $sort = 'desc')
{
$returnType = 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetProcesses';
$request = $this->getProcessesRequest($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 [\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders()];
}, function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new \WPMailSMTP\Vendor\SendinBlue\Client\ApiException(\sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), $response->getBody());
});
}
/**
* Create request for operation 'getProcesses'
*
* @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 &#x60;sort&#x60; is not passed (optional, default to desc)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
protected function getProcessesRequest($limit = '10', $offset = '0', $sort = 'desc')
{
if ($limit !== null && $limit > 50) {
throw new \InvalidArgumentException('invalid value for "$limit" when calling ProcessApi.getProcesses, must be smaller than or equal to 50.');
}
if ($limit !== null && $limit < 0) {
throw new \InvalidArgumentException('invalid value for "$limit" when calling ProcessApi.getProcesses, must be bigger than or equal to 0.');
}
$resourcePath = '/processes';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = \false;
// query params
if ($limit !== null) {
$queryParams['limit'] = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toQueryValue($limit);
}
// query params
if ($offset !== null) {
$queryParams['offset'] = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toQueryValue($offset);
}
// query params
if ($sort !== null) {
$queryParams['sort'] = \WPMailSMTP\Vendor\SendinBlue\Client\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 = \WPMailSMTP\Vendor\GuzzleHttp\json_encode($httpBody);
}
// array has no __toString(), so we should encode it manually
if (\is_array($httpBody)) {
$httpBody = \WPMailSMTP\Vendor\GuzzleHttp\json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\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 \WPMailSMTP\Vendor\GuzzleHttp\Psr7\MultipartStream($multipartContents);
} elseif ($headers['Content-Type'] === 'application/json') {
$httpBody = \WPMailSMTP\Vendor\GuzzleHttp\json_encode($formParams);
} else {
// for HTTP post (form)
$httpBody = \WPMailSMTP\Vendor\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 = \WPMailSMTP\Vendor\GuzzleHttp\Psr7\Query::build($queryParams);
return new \WPMailSMTP\Vendor\GuzzleHttp\Psr7\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[\WPMailSMTP\Vendor\GuzzleHttp\RequestOptions::DEBUG] = \fopen($this->config->getDebugFile(), 'a');
if (!$options[\WPMailSMTP\Vendor\GuzzleHttp\RequestOptions::DEBUG]) {
throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile());
}
}
return $options;
}
}
@@ -0,0 +1,997 @@
<?php
/**
* TransactionalSMSApi
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Api;
use WPMailSMTP\Vendor\GuzzleHttp\Client;
use WPMailSMTP\Vendor\GuzzleHttp\ClientInterface;
use WPMailSMTP\Vendor\GuzzleHttp\Exception\RequestException;
use WPMailSMTP\Vendor\GuzzleHttp\Psr7\MultipartStream;
use WPMailSMTP\Vendor\GuzzleHttp\Psr7\Request;
use WPMailSMTP\Vendor\GuzzleHttp\RequestOptions;
use WPMailSMTP\Vendor\SendinBlue\Client\ApiException;
use WPMailSMTP\Vendor\SendinBlue\Client\Configuration;
use WPMailSMTP\Vendor\SendinBlue\Client\HeaderSelector;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* TransactionalSMSApi Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class TransactionalSMSApi
{
/**
* @var ClientInterface
*/
protected $client;
/**
* @var Configuration
*/
protected $config;
/**
* @var HeaderSelector
*/
protected $headerSelector;
/**
* @param ClientInterface $client
* @param Configuration $config
* @param HeaderSelector $selector
*/
public function __construct(\WPMailSMTP\Vendor\GuzzleHttp\ClientInterface $client = null, \WPMailSMTP\Vendor\SendinBlue\Client\Configuration $config = null, \WPMailSMTP\Vendor\SendinBlue\Client\HeaderSelector $selector = null)
{
$this->client = $client ?: new \WPMailSMTP\Vendor\GuzzleHttp\Client();
$this->config = $config ?: new \WPMailSMTP\Vendor\SendinBlue\Client\Configuration();
$this->headerSelector = $selector ?: new \WPMailSMTP\Vendor\SendinBlue\Client\HeaderSelector();
}
/**
* @return Configuration
*/
public function getConfig()
{
return $this->config;
}
/**
* Operation getSmsEvents
*
* 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 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 &#39;startDate&#39; and &#39;endDate&#39; (optional)
* @param string $phoneNumber 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 &#x60;sort&#x60; is not passed (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')
{
list($response) = $this->getSmsEventsWithHttpInfo($limit, $startDate, $endDate, $offset, $days, $phoneNumber, $event, $tags, $sort);
return $response;
}
/**
* Operation getSmsEventsWithHttpInfo
*
* 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 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 &#39;startDate&#39; and &#39;endDate&#39; (optional)
* @param string $phoneNumber 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 &#x60;sort&#x60; is not passed (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')
{
$returnType = 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetSmsEventReport';
$request = $this->getSmsEventsRequest($limit, $startDate, $endDate, $offset, $days, $phoneNumber, $event, $tags, $sort);
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (\WPMailSMTP\Vendor\GuzzleHttp\Exception\RequestException $e) {
throw new \WPMailSMTP\Vendor\SendinBlue\Client\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 \WPMailSMTP\Vendor\SendinBlue\Client\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 [\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders()];
} catch (\WPMailSMTP\Vendor\SendinBlue\Client\ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetSmsEventReport', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 400:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\ErrorModel', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
throw $e;
}
}
/**
* Operation getSmsEventsAsync
*
* 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 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 &#39;startDate&#39; and &#39;endDate&#39; (optional)
* @param string $phoneNumber 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 &#x60;sort&#x60; is not passed (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')
{
return $this->getSmsEventsAsyncWithHttpInfo($limit, $startDate, $endDate, $offset, $days, $phoneNumber, $event, $tags, $sort)->then(function ($response) {
return $response[0];
});
}
/**
* Operation getSmsEventsAsyncWithHttpInfo
*
* 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 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 &#39;startDate&#39; and &#39;endDate&#39; (optional)
* @param string $phoneNumber 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 &#x60;sort&#x60; is not passed (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')
{
$returnType = 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetSmsEventReport';
$request = $this->getSmsEventsRequest($limit, $startDate, $endDate, $offset, $days, $phoneNumber, $event, $tags, $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 [\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders()];
}, function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new \WPMailSMTP\Vendor\SendinBlue\Client\ApiException(\sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), $response->getBody());
});
}
/**
* 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 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 &#39;startDate&#39; and &#39;endDate&#39; (optional)
* @param string $phoneNumber 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 &#x60;sort&#x60; is not passed (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')
{
if ($limit !== null && $limit > 100) {
throw new \InvalidArgumentException('invalid value for "$limit" when calling TransactionalSMSApi.getSmsEvents, must be smaller than or equal to 100.');
}
$resourcePath = '/transactionalSMS/statistics/events';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = \false;
// query params
if ($limit !== null) {
$queryParams['limit'] = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toQueryValue($limit);
}
// query params
if ($startDate !== null) {
$queryParams['startDate'] = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toQueryValue($startDate);
}
// query params
if ($endDate !== null) {
$queryParams['endDate'] = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toQueryValue($endDate);
}
// query params
if ($offset !== null) {
$queryParams['offset'] = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toQueryValue($offset);
}
// query params
if ($days !== null) {
$queryParams['days'] = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toQueryValue($days);
}
// query params
if ($phoneNumber !== null) {
$queryParams['phoneNumber'] = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toQueryValue($phoneNumber);
}
// query params
if ($event !== null) {
$queryParams['event'] = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toQueryValue($event);
}
// query params
if ($tags !== null) {
$queryParams['tags'] = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toQueryValue($tags);
}
// query params
if ($sort !== null) {
$queryParams['sort'] = \WPMailSMTP\Vendor\SendinBlue\Client\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 = \WPMailSMTP\Vendor\GuzzleHttp\json_encode($httpBody);
}
// array has no __toString(), so we should encode it manually
if (\is_array($httpBody)) {
$httpBody = \WPMailSMTP\Vendor\GuzzleHttp\json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\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 \WPMailSMTP\Vendor\GuzzleHttp\Psr7\MultipartStream($multipartContents);
} elseif ($headers['Content-Type'] === 'application/json') {
$httpBody = \WPMailSMTP\Vendor\GuzzleHttp\json_encode($formParams);
} else {
// for HTTP post (form)
$httpBody = \WPMailSMTP\Vendor\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 = \WPMailSMTP\Vendor\GuzzleHttp\Psr7\Query::build($queryParams);
return new \WPMailSMTP\Vendor\GuzzleHttp\Psr7\Request('GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody);
}
/**
* Operation getTransacAggregatedSmsReport
*
* 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 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 \SendinBlue\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return \SendinBlue\Client\Model\GetTransacAggregatedSmsReport
*/
public function getTransacAggregatedSmsReport($startDate = null, $endDate = null, $days = null, $tag = null)
{
list($response) = $this->getTransacAggregatedSmsReportWithHttpInfo($startDate, $endDate, $days, $tag);
return $response;
}
/**
* Operation getTransacAggregatedSmsReportWithHttpInfo
*
* 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 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 \SendinBlue\Client\ApiException on non-2xx response
* @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)
{
$returnType = 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetTransacAggregatedSmsReport';
$request = $this->getTransacAggregatedSmsReportRequest($startDate, $endDate, $days, $tag);
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (\WPMailSMTP\Vendor\GuzzleHttp\Exception\RequestException $e) {
throw new \WPMailSMTP\Vendor\SendinBlue\Client\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 \WPMailSMTP\Vendor\SendinBlue\Client\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 [\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders()];
} catch (\WPMailSMTP\Vendor\SendinBlue\Client\ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetTransacAggregatedSmsReport', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 400:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\ErrorModel', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
throw $e;
}
}
/**
* Operation getTransacAggregatedSmsReportAsync
*
* 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 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)
{
return $this->getTransacAggregatedSmsReportAsyncWithHttpInfo($startDate, $endDate, $days, $tag)->then(function ($response) {
return $response[0];
});
}
/**
* Operation getTransacAggregatedSmsReportAsyncWithHttpInfo
*
* 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 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)
{
$returnType = 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetTransacAggregatedSmsReport';
$request = $this->getTransacAggregatedSmsReportRequest($startDate, $endDate, $days, $tag);
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 [\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders()];
}, function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new \WPMailSMTP\Vendor\SendinBlue\Client\ApiException(\sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), $response->getBody());
});
}
/**
* 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 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)
{
$resourcePath = '/transactionalSMS/statistics/aggregatedReport';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = \false;
// query params
if ($startDate !== null) {
$queryParams['startDate'] = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toQueryValue($startDate);
}
// query params
if ($endDate !== null) {
$queryParams['endDate'] = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toQueryValue($endDate);
}
// query params
if ($days !== null) {
$queryParams['days'] = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toQueryValue($days);
}
// query params
if ($tag !== null) {
$queryParams['tag'] = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toQueryValue($tag);
}
// 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 = \WPMailSMTP\Vendor\GuzzleHttp\json_encode($httpBody);
}
// array has no __toString(), so we should encode it manually
if (\is_array($httpBody)) {
$httpBody = \WPMailSMTP\Vendor\GuzzleHttp\json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\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 \WPMailSMTP\Vendor\GuzzleHttp\Psr7\MultipartStream($multipartContents);
} elseif ($headers['Content-Type'] === 'application/json') {
$httpBody = \WPMailSMTP\Vendor\GuzzleHttp\json_encode($formParams);
} else {
// for HTTP post (form)
$httpBody = \WPMailSMTP\Vendor\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 = \WPMailSMTP\Vendor\GuzzleHttp\Psr7\Query::build($queryParams);
return new \WPMailSMTP\Vendor\GuzzleHttp\Psr7\Request('GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody);
}
/**
* Operation getTransacSmsReport
*
* 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 int $days Number of days in the past including today (positive integer). Not compatible with &#39;startDate&#39; and &#39;endDate&#39; (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 &#x60;sort&#x60; is not passed (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')
{
list($response) = $this->getTransacSmsReportWithHttpInfo($startDate, $endDate, $days, $tag, $sort);
return $response;
}
/**
* Operation getTransacSmsReportWithHttpInfo
*
* 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 int $days Number of days in the past including today (positive integer). Not compatible with &#39;startDate&#39; and &#39;endDate&#39; (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 &#x60;sort&#x60; is not passed (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')
{
$returnType = 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetTransacSmsReport';
$request = $this->getTransacSmsReportRequest($startDate, $endDate, $days, $tag, $sort);
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (\WPMailSMTP\Vendor\GuzzleHttp\Exception\RequestException $e) {
throw new \WPMailSMTP\Vendor\SendinBlue\Client\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 \WPMailSMTP\Vendor\SendinBlue\Client\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 [\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders()];
} catch (\WPMailSMTP\Vendor\SendinBlue\Client\ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetTransacSmsReport', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 400:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\ErrorModel', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
throw $e;
}
}
/**
* Operation getTransacSmsReportAsync
*
* 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 int $days Number of days in the past including today (positive integer). Not compatible with &#39;startDate&#39; and &#39;endDate&#39; (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 &#x60;sort&#x60; is not passed (optional, default to desc)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function getTransacSmsReportAsync($startDate = null, $endDate = null, $days = null, $tag = null, $sort = 'desc')
{
return $this->getTransacSmsReportAsyncWithHttpInfo($startDate, $endDate, $days, $tag, $sort)->then(function ($response) {
return $response[0];
});
}
/**
* Operation getTransacSmsReportAsyncWithHttpInfo
*
* 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 int $days Number of days in the past including today (positive integer). Not compatible with &#39;startDate&#39; and &#39;endDate&#39; (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 &#x60;sort&#x60; is not passed (optional, default to desc)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function getTransacSmsReportAsyncWithHttpInfo($startDate = null, $endDate = null, $days = null, $tag = null, $sort = 'desc')
{
$returnType = 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetTransacSmsReport';
$request = $this->getTransacSmsReportRequest($startDate, $endDate, $days, $tag, $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 [\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders()];
}, function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new \WPMailSMTP\Vendor\SendinBlue\Client\ApiException(\sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), $response->getBody());
});
}
/**
* 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 int $days Number of days in the past including today (positive integer). Not compatible with &#39;startDate&#39; and &#39;endDate&#39; (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 &#x60;sort&#x60; is not passed (optional, default to desc)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
protected function getTransacSmsReportRequest($startDate = null, $endDate = null, $days = null, $tag = null, $sort = 'desc')
{
$resourcePath = '/transactionalSMS/statistics/reports';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = \false;
// query params
if ($startDate !== null) {
$queryParams['startDate'] = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toQueryValue($startDate);
}
// query params
if ($endDate !== null) {
$queryParams['endDate'] = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toQueryValue($endDate);
}
// query params
if ($days !== null) {
$queryParams['days'] = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toQueryValue($days);
}
// query params
if ($tag !== null) {
$queryParams['tag'] = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toQueryValue($tag);
}
// query params
if ($sort !== null) {
$queryParams['sort'] = \WPMailSMTP\Vendor\SendinBlue\Client\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 = \WPMailSMTP\Vendor\GuzzleHttp\json_encode($httpBody);
}
// array has no __toString(), so we should encode it manually
if (\is_array($httpBody)) {
$httpBody = \WPMailSMTP\Vendor\GuzzleHttp\json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\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 \WPMailSMTP\Vendor\GuzzleHttp\Psr7\MultipartStream($multipartContents);
} elseif ($headers['Content-Type'] === 'application/json') {
$httpBody = \WPMailSMTP\Vendor\GuzzleHttp\json_encode($formParams);
} else {
// for HTTP post (form)
$httpBody = \WPMailSMTP\Vendor\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 = \WPMailSMTP\Vendor\GuzzleHttp\Psr7\Query::build($queryParams);
return new \WPMailSMTP\Vendor\GuzzleHttp\Psr7\Request('GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody);
}
/**
* Operation sendTransacSms
*
* Send SMS message to a mobile number
*
* @param \SendinBlue\Client\Model\SendTransacSms $sendTransacSms 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)
{
list($response) = $this->sendTransacSmsWithHttpInfo($sendTransacSms);
return $response;
}
/**
* Operation sendTransacSmsWithHttpInfo
*
* Send SMS message to a mobile number
*
* @param \SendinBlue\Client\Model\SendTransacSms $sendTransacSms 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)
{
$returnType = 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\SendSms';
$request = $this->sendTransacSmsRequest($sendTransacSms);
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (\WPMailSMTP\Vendor\GuzzleHttp\Exception\RequestException $e) {
throw new \WPMailSMTP\Vendor\SendinBlue\Client\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 \WPMailSMTP\Vendor\SendinBlue\Client\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 [\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders()];
} catch (\WPMailSMTP\Vendor\SendinBlue\Client\ApiException $e) {
switch ($e->getCode()) {
case 201:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\SendSms', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 400:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\ErrorModel', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 402:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\ErrorModel', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
throw $e;
}
}
/**
* Operation sendTransacSmsAsync
*
* Send SMS message to a mobile number
*
* @param \SendinBlue\Client\Model\SendTransacSms $sendTransacSms Values to send a transactional SMS (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function sendTransacSmsAsync($sendTransacSms)
{
return $this->sendTransacSmsAsyncWithHttpInfo($sendTransacSms)->then(function ($response) {
return $response[0];
});
}
/**
* Operation sendTransacSmsAsyncWithHttpInfo
*
* Send SMS message to a mobile number
*
* @param \SendinBlue\Client\Model\SendTransacSms $sendTransacSms Values to send a transactional SMS (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function sendTransacSmsAsyncWithHttpInfo($sendTransacSms)
{
$returnType = 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\SendSms';
$request = $this->sendTransacSmsRequest($sendTransacSms);
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 [\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders()];
}, function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new \WPMailSMTP\Vendor\SendinBlue\Client\ApiException(\sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), $response->getBody());
});
}
/**
* Create request for operation 'sendTransacSms'
*
* @param \SendinBlue\Client\Model\SendTransacSms $sendTransacSms Values to send a transactional SMS (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
protected function sendTransacSmsRequest($sendTransacSms)
{
// verify the required parameter 'sendTransacSms' is set
if ($sendTransacSms === null || \is_array($sendTransacSms) && \count($sendTransacSms) === 0) {
throw new \InvalidArgumentException('Missing the required parameter $sendTransacSms when calling sendTransacSms');
}
$resourcePath = '/transactionalSMS/sms';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = \false;
// body params
$_tempBody = null;
if (isset($sendTransacSms)) {
$_tempBody = $sendTransacSms;
}
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 = \WPMailSMTP\Vendor\GuzzleHttp\json_encode($httpBody);
}
// array has no __toString(), so we should encode it manually
if (\is_array($httpBody)) {
$httpBody = \WPMailSMTP\Vendor\GuzzleHttp\json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\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 \WPMailSMTP\Vendor\GuzzleHttp\Psr7\MultipartStream($multipartContents);
} elseif ($headers['Content-Type'] === 'application/json') {
$httpBody = \WPMailSMTP\Vendor\GuzzleHttp\json_encode($formParams);
} else {
// for HTTP post (form)
$httpBody = \WPMailSMTP\Vendor\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 = \WPMailSMTP\Vendor\GuzzleHttp\Psr7\Query::build($queryParams);
return new \WPMailSMTP\Vendor\GuzzleHttp\Psr7\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[\WPMailSMTP\Vendor\GuzzleHttp\RequestOptions::DEBUG] = \fopen($this->config->getDebugFile(), 'a');
if (!$options[\WPMailSMTP\Vendor\GuzzleHttp\RequestOptions::DEBUG]) {
throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile());
}
}
return $options;
}
}
@@ -0,0 +1,546 @@
<?php
/**
* TransactionalWhatsAppApi
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Api;
use WPMailSMTP\Vendor\GuzzleHttp\Client;
use WPMailSMTP\Vendor\GuzzleHttp\ClientInterface;
use WPMailSMTP\Vendor\GuzzleHttp\Exception\RequestException;
use WPMailSMTP\Vendor\GuzzleHttp\Psr7\MultipartStream;
use WPMailSMTP\Vendor\GuzzleHttp\Psr7\Request;
use WPMailSMTP\Vendor\GuzzleHttp\RequestOptions;
use WPMailSMTP\Vendor\SendinBlue\Client\ApiException;
use WPMailSMTP\Vendor\SendinBlue\Client\Configuration;
use WPMailSMTP\Vendor\SendinBlue\Client\HeaderSelector;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* TransactionalWhatsAppApi Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class TransactionalWhatsAppApi
{
/**
* @var ClientInterface
*/
protected $client;
/**
* @var Configuration
*/
protected $config;
/**
* @var HeaderSelector
*/
protected $headerSelector;
/**
* @param ClientInterface $client
* @param Configuration $config
* @param HeaderSelector $selector
*/
public function __construct(\WPMailSMTP\Vendor\GuzzleHttp\ClientInterface $client = null, \WPMailSMTP\Vendor\SendinBlue\Client\Configuration $config = null, \WPMailSMTP\Vendor\SendinBlue\Client\HeaderSelector $selector = null)
{
$this->client = $client ?: new \WPMailSMTP\Vendor\GuzzleHttp\Client();
$this->config = $config ?: new \WPMailSMTP\Vendor\SendinBlue\Client\Configuration();
$this->headerSelector = $selector ?: new \WPMailSMTP\Vendor\SendinBlue\Client\HeaderSelector();
}
/**
* @return Configuration
*/
public function getConfig()
{
return $this->config;
}
/**
* Operation getWhatsappEventReport
*
* Get all your WhatsApp activity (unaggregated events)
*
* @param int $limit Number limitation for the result returned (optional, default to 2500)
* @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 int $days Number of days in the past including today (positive integer). _Not compatible with &#39;startDate&#39; and &#39;endDate&#39;_ (optional)
* @param string $contactNumber Filter results for specific contact (WhatsApp Number with country code. Example, 85264318721) (optional)
* @param string $event Filter the report for a specific event type (optional)
* @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if &#x60;sort&#x60; is not passed (optional, default to desc)
*
* @throws \SendinBlue\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return \SendinBlue\Client\Model\GetWhatsappEventReport
*/
public function getWhatsappEventReport($limit = '2500', $offset = '0', $startDate = null, $endDate = null, $days = null, $contactNumber = null, $event = null, $sort = 'desc')
{
list($response) = $this->getWhatsappEventReportWithHttpInfo($limit, $offset, $startDate, $endDate, $days, $contactNumber, $event, $sort);
return $response;
}
/**
* Operation getWhatsappEventReportWithHttpInfo
*
* Get all your WhatsApp activity (unaggregated events)
*
* @param int $limit Number limitation for the result returned (optional, default to 2500)
* @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 int $days Number of days in the past including today (positive integer). _Not compatible with &#39;startDate&#39; and &#39;endDate&#39;_ (optional)
* @param string $contactNumber Filter results for specific contact (WhatsApp Number with country code. Example, 85264318721) (optional)
* @param string $event Filter the report for a specific event type (optional)
* @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if &#x60;sort&#x60; is not passed (optional, default to desc)
*
* @throws \SendinBlue\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return array of \SendinBlue\Client\Model\GetWhatsappEventReport, HTTP status code, HTTP response headers (array of strings)
*/
public function getWhatsappEventReportWithHttpInfo($limit = '2500', $offset = '0', $startDate = null, $endDate = null, $days = null, $contactNumber = null, $event = null, $sort = 'desc')
{
$returnType = 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetWhatsappEventReport';
$request = $this->getWhatsappEventReportRequest($limit, $offset, $startDate, $endDate, $days, $contactNumber, $event, $sort);
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (\WPMailSMTP\Vendor\GuzzleHttp\Exception\RequestException $e) {
throw new \WPMailSMTP\Vendor\SendinBlue\Client\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 \WPMailSMTP\Vendor\SendinBlue\Client\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 [\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders()];
} catch (\WPMailSMTP\Vendor\SendinBlue\Client\ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetWhatsappEventReport', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 400:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\ErrorModel', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
throw $e;
}
}
/**
* Operation getWhatsappEventReportAsync
*
* Get all your WhatsApp activity (unaggregated events)
*
* @param int $limit Number limitation for the result returned (optional, default to 2500)
* @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 int $days Number of days in the past including today (positive integer). _Not compatible with &#39;startDate&#39; and &#39;endDate&#39;_ (optional)
* @param string $contactNumber Filter results for specific contact (WhatsApp Number with country code. Example, 85264318721) (optional)
* @param string $event Filter the report for a specific event type (optional)
* @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if &#x60;sort&#x60; is not passed (optional, default to desc)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function getWhatsappEventReportAsync($limit = '2500', $offset = '0', $startDate = null, $endDate = null, $days = null, $contactNumber = null, $event = null, $sort = 'desc')
{
return $this->getWhatsappEventReportAsyncWithHttpInfo($limit, $offset, $startDate, $endDate, $days, $contactNumber, $event, $sort)->then(function ($response) {
return $response[0];
});
}
/**
* Operation getWhatsappEventReportAsyncWithHttpInfo
*
* Get all your WhatsApp activity (unaggregated events)
*
* @param int $limit Number limitation for the result returned (optional, default to 2500)
* @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 int $days Number of days in the past including today (positive integer). _Not compatible with &#39;startDate&#39; and &#39;endDate&#39;_ (optional)
* @param string $contactNumber Filter results for specific contact (WhatsApp Number with country code. Example, 85264318721) (optional)
* @param string $event Filter the report for a specific event type (optional)
* @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if &#x60;sort&#x60; is not passed (optional, default to desc)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function getWhatsappEventReportAsyncWithHttpInfo($limit = '2500', $offset = '0', $startDate = null, $endDate = null, $days = null, $contactNumber = null, $event = null, $sort = 'desc')
{
$returnType = 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetWhatsappEventReport';
$request = $this->getWhatsappEventReportRequest($limit, $offset, $startDate, $endDate, $days, $contactNumber, $event, $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 [\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders()];
}, function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new \WPMailSMTP\Vendor\SendinBlue\Client\ApiException(\sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), $response->getBody());
});
}
/**
* Create request for operation 'getWhatsappEventReport'
*
* @param int $limit Number limitation for the result returned (optional, default to 2500)
* @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 int $days Number of days in the past including today (positive integer). _Not compatible with &#39;startDate&#39; and &#39;endDate&#39;_ (optional)
* @param string $contactNumber Filter results for specific contact (WhatsApp Number with country code. Example, 85264318721) (optional)
* @param string $event Filter the report for a specific event type (optional)
* @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if &#x60;sort&#x60; is not passed (optional, default to desc)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
protected function getWhatsappEventReportRequest($limit = '2500', $offset = '0', $startDate = null, $endDate = null, $days = null, $contactNumber = null, $event = null, $sort = 'desc')
{
if ($limit !== null && $limit > 5000) {
throw new \InvalidArgumentException('invalid value for "$limit" when calling TransactionalWhatsAppApi.getWhatsappEventReport, must be smaller than or equal to 5000.');
}
if ($limit !== null && $limit < 0) {
throw new \InvalidArgumentException('invalid value for "$limit" when calling TransactionalWhatsAppApi.getWhatsappEventReport, must be bigger than or equal to 0.');
}
$resourcePath = '/whatsapp/statistics/events';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = \false;
// query params
if ($limit !== null) {
$queryParams['limit'] = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toQueryValue($limit);
}
// query params
if ($offset !== null) {
$queryParams['offset'] = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toQueryValue($offset);
}
// query params
if ($startDate !== null) {
$queryParams['startDate'] = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toQueryValue($startDate);
}
// query params
if ($endDate !== null) {
$queryParams['endDate'] = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toQueryValue($endDate);
}
// query params
if ($days !== null) {
$queryParams['days'] = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toQueryValue($days);
}
// query params
if ($contactNumber !== null) {
$queryParams['contactNumber'] = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toQueryValue($contactNumber);
}
// query params
if ($event !== null) {
$queryParams['event'] = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toQueryValue($event);
}
// query params
if ($sort !== null) {
$queryParams['sort'] = \WPMailSMTP\Vendor\SendinBlue\Client\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 = \WPMailSMTP\Vendor\GuzzleHttp\json_encode($httpBody);
}
// array has no __toString(), so we should encode it manually
if (\is_array($httpBody)) {
$httpBody = \WPMailSMTP\Vendor\GuzzleHttp\json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\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 \WPMailSMTP\Vendor\GuzzleHttp\Psr7\MultipartStream($multipartContents);
} elseif ($headers['Content-Type'] === 'application/json') {
$httpBody = \WPMailSMTP\Vendor\GuzzleHttp\json_encode($formParams);
} else {
// for HTTP post (form)
$httpBody = \WPMailSMTP\Vendor\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 = \WPMailSMTP\Vendor\GuzzleHttp\Psr7\Query::build($queryParams);
return new \WPMailSMTP\Vendor\GuzzleHttp\Psr7\Request('GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody);
}
/**
* Operation sendWhatsappMessage
*
* Send a WhatsApp message
*
* @param \SendinBlue\Client\Model\SendWhatsappMessage $sendWhatsappMessage Values to send WhatsApp message (required)
*
* @throws \SendinBlue\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return \SendinBlue\Client\Model\InlineResponse2012
*/
public function sendWhatsappMessage($sendWhatsappMessage)
{
list($response) = $this->sendWhatsappMessageWithHttpInfo($sendWhatsappMessage);
return $response;
}
/**
* Operation sendWhatsappMessageWithHttpInfo
*
* Send a WhatsApp message
*
* @param \SendinBlue\Client\Model\SendWhatsappMessage $sendWhatsappMessage Values to send WhatsApp message (required)
*
* @throws \SendinBlue\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return array of \SendinBlue\Client\Model\InlineResponse2012, HTTP status code, HTTP response headers (array of strings)
*/
public function sendWhatsappMessageWithHttpInfo($sendWhatsappMessage)
{
$returnType = 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\InlineResponse2012';
$request = $this->sendWhatsappMessageRequest($sendWhatsappMessage);
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (\WPMailSMTP\Vendor\GuzzleHttp\Exception\RequestException $e) {
throw new \WPMailSMTP\Vendor\SendinBlue\Client\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 \WPMailSMTP\Vendor\SendinBlue\Client\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 [\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders()];
} catch (\WPMailSMTP\Vendor\SendinBlue\Client\ApiException $e) {
switch ($e->getCode()) {
case 201:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\InlineResponse2012', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 400:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\ErrorModel', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
throw $e;
}
}
/**
* Operation sendWhatsappMessageAsync
*
* Send a WhatsApp message
*
* @param \SendinBlue\Client\Model\SendWhatsappMessage $sendWhatsappMessage Values to send WhatsApp message (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function sendWhatsappMessageAsync($sendWhatsappMessage)
{
return $this->sendWhatsappMessageAsyncWithHttpInfo($sendWhatsappMessage)->then(function ($response) {
return $response[0];
});
}
/**
* Operation sendWhatsappMessageAsyncWithHttpInfo
*
* Send a WhatsApp message
*
* @param \SendinBlue\Client\Model\SendWhatsappMessage $sendWhatsappMessage Values to send WhatsApp message (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function sendWhatsappMessageAsyncWithHttpInfo($sendWhatsappMessage)
{
$returnType = 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\InlineResponse2012';
$request = $this->sendWhatsappMessageRequest($sendWhatsappMessage);
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 [\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders()];
}, function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new \WPMailSMTP\Vendor\SendinBlue\Client\ApiException(\sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), $response->getBody());
});
}
/**
* Create request for operation 'sendWhatsappMessage'
*
* @param \SendinBlue\Client\Model\SendWhatsappMessage $sendWhatsappMessage Values to send WhatsApp message (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
protected function sendWhatsappMessageRequest($sendWhatsappMessage)
{
// verify the required parameter 'sendWhatsappMessage' is set
if ($sendWhatsappMessage === null || \is_array($sendWhatsappMessage) && \count($sendWhatsappMessage) === 0) {
throw new \InvalidArgumentException('Missing the required parameter $sendWhatsappMessage when calling sendWhatsappMessage');
}
$resourcePath = '/whatsapp/sendMessage';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = \false;
// body params
$_tempBody = null;
if (isset($sendWhatsappMessage)) {
$_tempBody = $sendWhatsappMessage;
}
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 = \WPMailSMTP\Vendor\GuzzleHttp\json_encode($httpBody);
}
// array has no __toString(), so we should encode it manually
if (\is_array($httpBody)) {
$httpBody = \WPMailSMTP\Vendor\GuzzleHttp\json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\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 \WPMailSMTP\Vendor\GuzzleHttp\Psr7\MultipartStream($multipartContents);
} elseif ($headers['Content-Type'] === 'application/json') {
$httpBody = \WPMailSMTP\Vendor\GuzzleHttp\json_encode($formParams);
} else {
// for HTTP post (form)
$httpBody = \WPMailSMTP\Vendor\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 = \WPMailSMTP\Vendor\GuzzleHttp\Psr7\Query::build($queryParams);
return new \WPMailSMTP\Vendor\GuzzleHttp\Psr7\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[\WPMailSMTP\Vendor\GuzzleHttp\RequestOptions::DEBUG] = \fopen($this->config->getDebugFile(), 'a');
if (!$options[\WPMailSMTP\Vendor\GuzzleHttp\RequestOptions::DEBUG]) {
throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile());
}
}
return $options;
}
}
@@ -0,0 +1,465 @@
<?php
/**
* WhatsappCampaignsApi
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Api;
use WPMailSMTP\Vendor\GuzzleHttp\Client;
use WPMailSMTP\Vendor\GuzzleHttp\ClientInterface;
use WPMailSMTP\Vendor\GuzzleHttp\Exception\RequestException;
use WPMailSMTP\Vendor\GuzzleHttp\Psr7\MultipartStream;
use WPMailSMTP\Vendor\GuzzleHttp\Psr7\Request;
use WPMailSMTP\Vendor\GuzzleHttp\RequestOptions;
use WPMailSMTP\Vendor\SendinBlue\Client\ApiException;
use WPMailSMTP\Vendor\SendinBlue\Client\Configuration;
use WPMailSMTP\Vendor\SendinBlue\Client\HeaderSelector;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* WhatsappCampaignsApi Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class WhatsappCampaignsApi
{
/**
* @var ClientInterface
*/
protected $client;
/**
* @var Configuration
*/
protected $config;
/**
* @var HeaderSelector
*/
protected $headerSelector;
/**
* @param ClientInterface $client
* @param Configuration $config
* @param HeaderSelector $selector
*/
public function __construct(\WPMailSMTP\Vendor\GuzzleHttp\ClientInterface $client = null, \WPMailSMTP\Vendor\SendinBlue\Client\Configuration $config = null, \WPMailSMTP\Vendor\SendinBlue\Client\HeaderSelector $selector = null)
{
$this->client = $client ?: new \WPMailSMTP\Vendor\GuzzleHttp\Client();
$this->config = $config ?: new \WPMailSMTP\Vendor\SendinBlue\Client\Configuration();
$this->headerSelector = $selector ?: new \WPMailSMTP\Vendor\SendinBlue\Client\HeaderSelector();
}
/**
* @return Configuration
*/
public function getConfig()
{
return $this->config;
}
/**
* Operation deleteWhatsappCampaign
*
* Delete a whatsapp campaign
*
* @param int $campaignId id of the campaign (required)
*
* @throws \SendinBlue\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return void
*/
public function deleteWhatsappCampaign($campaignId)
{
$this->deleteWhatsappCampaignWithHttpInfo($campaignId);
}
/**
* Operation deleteWhatsappCampaignWithHttpInfo
*
* Delete a whatsapp campaign
*
* @param int $campaignId 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 deleteWhatsappCampaignWithHttpInfo($campaignId)
{
$returnType = '';
$request = $this->deleteWhatsappCampaignRequest($campaignId);
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (\WPMailSMTP\Vendor\GuzzleHttp\Exception\RequestException $e) {
throw new \WPMailSMTP\Vendor\SendinBlue\Client\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 \WPMailSMTP\Vendor\SendinBlue\Client\ApiException(\sprintf('[%d] Error connecting to the API (%s)', $statusCode, $request->getUri()), $statusCode, $response->getHeaders(), $response->getBody());
}
return [null, $statusCode, $response->getHeaders()];
} catch (\WPMailSMTP\Vendor\SendinBlue\Client\ApiException $e) {
switch ($e->getCode()) {
case 400:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\ErrorModel', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 404:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\ErrorModel', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
throw $e;
}
}
/**
* Operation deleteWhatsappCampaignAsync
*
* Delete a whatsapp campaign
*
* @param int $campaignId id of the campaign (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function deleteWhatsappCampaignAsync($campaignId)
{
return $this->deleteWhatsappCampaignAsyncWithHttpInfo($campaignId)->then(function ($response) {
return $response[0];
});
}
/**
* Operation deleteWhatsappCampaignAsyncWithHttpInfo
*
* Delete a whatsapp campaign
*
* @param int $campaignId id of the campaign (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function deleteWhatsappCampaignAsyncWithHttpInfo($campaignId)
{
$returnType = '';
$request = $this->deleteWhatsappCampaignRequest($campaignId);
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 \WPMailSMTP\Vendor\SendinBlue\Client\ApiException(\sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), $response->getBody());
});
}
/**
* Create request for operation 'deleteWhatsappCampaign'
*
* @param int $campaignId id of the campaign (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
protected function deleteWhatsappCampaignRequest($campaignId)
{
// verify the required parameter 'campaignId' is set
if ($campaignId === null || \is_array($campaignId) && \count($campaignId) === 0) {
throw new \InvalidArgumentException('Missing the required parameter $campaignId when calling deleteWhatsappCampaign');
}
$resourcePath = '/whatsappCampaigns/{campaignId}';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = \false;
// path params
if ($campaignId !== null) {
$resourcePath = \str_replace('{' . 'campaignId' . '}', \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toPathValue($campaignId), $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 = \WPMailSMTP\Vendor\GuzzleHttp\json_encode($httpBody);
}
// array has no __toString(), so we should encode it manually
if (\is_array($httpBody)) {
$httpBody = \WPMailSMTP\Vendor\GuzzleHttp\json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\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 \WPMailSMTP\Vendor\GuzzleHttp\Psr7\MultipartStream($multipartContents);
} elseif ($headers['Content-Type'] === 'application/json') {
$httpBody = \WPMailSMTP\Vendor\GuzzleHttp\json_encode($formParams);
} else {
// for HTTP post (form)
$httpBody = \WPMailSMTP\Vendor\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 = \WPMailSMTP\Vendor\GuzzleHttp\Psr7\Query::build($queryParams);
return new \WPMailSMTP\Vendor\GuzzleHttp\Psr7\Request('DELETE', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody);
}
/**
* Operation getWhatsappCampaign
*
* Get a whatsapp campaign
*
* @param string $campaignId Id of the campaign (required)
*
* @throws \SendinBlue\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return \SendinBlue\Client\Model\GetWhatsappCampaignOverview
*/
public function getWhatsappCampaign($campaignId)
{
list($response) = $this->getWhatsappCampaignWithHttpInfo($campaignId);
return $response;
}
/**
* Operation getWhatsappCampaignWithHttpInfo
*
* Get a whatsapp campaign
*
* @param string $campaignId Id of the campaign (required)
*
* @throws \SendinBlue\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return array of \SendinBlue\Client\Model\GetWhatsappCampaignOverview, HTTP status code, HTTP response headers (array of strings)
*/
public function getWhatsappCampaignWithHttpInfo($campaignId)
{
$returnType = 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetWhatsappCampaignOverview';
$request = $this->getWhatsappCampaignRequest($campaignId);
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (\WPMailSMTP\Vendor\GuzzleHttp\Exception\RequestException $e) {
throw new \WPMailSMTP\Vendor\SendinBlue\Client\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 \WPMailSMTP\Vendor\SendinBlue\Client\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 [\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders()];
} catch (\WPMailSMTP\Vendor\SendinBlue\Client\ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetWhatsappCampaignOverview', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 400:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\ErrorModel', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 404:
$data = \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\ErrorModel', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
throw $e;
}
}
/**
* Operation getWhatsappCampaignAsync
*
* Get a whatsapp campaign
*
* @param string $campaignId Id of the campaign (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function getWhatsappCampaignAsync($campaignId)
{
return $this->getWhatsappCampaignAsyncWithHttpInfo($campaignId)->then(function ($response) {
return $response[0];
});
}
/**
* Operation getWhatsappCampaignAsyncWithHttpInfo
*
* Get a whatsapp campaign
*
* @param string $campaignId Id of the campaign (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function getWhatsappCampaignAsyncWithHttpInfo($campaignId)
{
$returnType = 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetWhatsappCampaignOverview';
$request = $this->getWhatsappCampaignRequest($campaignId);
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 [\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders()];
}, function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new \WPMailSMTP\Vendor\SendinBlue\Client\ApiException(\sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), $response->getBody());
});
}
/**
* Create request for operation 'getWhatsappCampaign'
*
* @param string $campaignId Id of the campaign (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
protected function getWhatsappCampaignRequest($campaignId)
{
// verify the required parameter 'campaignId' is set
if ($campaignId === null || \is_array($campaignId) && \count($campaignId) === 0) {
throw new \InvalidArgumentException('Missing the required parameter $campaignId when calling getWhatsappCampaign');
}
$resourcePath = '/whatsappCampaigns/{campaignId}';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = \false;
// path params
if ($campaignId !== null) {
$resourcePath = \str_replace('{' . 'campaignId' . '}', \WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::toPathValue($campaignId), $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 = \WPMailSMTP\Vendor\GuzzleHttp\json_encode($httpBody);
}
// array has no __toString(), so we should encode it manually
if (\is_array($httpBody)) {
$httpBody = \WPMailSMTP\Vendor\GuzzleHttp\json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\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 \WPMailSMTP\Vendor\GuzzleHttp\Psr7\MultipartStream($multipartContents);
} elseif ($headers['Content-Type'] === 'application/json') {
$httpBody = \WPMailSMTP\Vendor\GuzzleHttp\json_encode($formParams);
} else {
// for HTTP post (form)
$httpBody = \WPMailSMTP\Vendor\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 = \WPMailSMTP\Vendor\GuzzleHttp\Psr7\Query::build($queryParams);
return new \WPMailSMTP\Vendor\GuzzleHttp\Psr7\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[\WPMailSMTP\Vendor\GuzzleHttp\RequestOptions::DEBUG] = \fopen($this->config->getDebugFile(), 'a');
if (!$options[\WPMailSMTP\Vendor\GuzzleHttp\RequestOptions::DEBUG]) {
throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile());
}
}
return $options;
}
}
@@ -0,0 +1,110 @@
<?php
/**
* ApiException
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client;
use Exception;
/**
* ApiException Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class ApiException extends \Exception
{
/**
* The HTTP body of the server response either as Json or string.
*
* @var mixed
*/
protected $responseBody;
/**
* The HTTP header of the server response.
*
* @var string[]|null
*/
protected $responseHeaders;
/**
* The deserialized response object
*
* @var $responseObject;
*/
protected $responseObject;
/**
* Constructor
*
* @param string $message Error message
* @param int $code HTTP status code
* @param string[]|null $responseHeaders HTTP response header
* @param mixed $responseBody HTTP decoded body of the server response either as \stdClass or string
*/
public function __construct($message = "", $code = 0, $responseHeaders = [], $responseBody = null)
{
parent::__construct($message, $code);
$this->responseHeaders = $responseHeaders;
$this->responseBody = $responseBody;
}
/**
* Gets the HTTP response header
*
* @return string[]|null HTTP response header
*/
public function getResponseHeaders()
{
return $this->responseHeaders;
}
/**
* Gets the HTTP body of the server response either as Json or string
*
* @return mixed HTTP body of the server response either as \stdClass or string
*/
public function getResponseBody()
{
return $this->responseBody;
}
/**
* Sets the deseralized response object (during deserialization)
*
* @param mixed $obj Deserialized response object
*
* @return void
*/
public function setResponseObject($obj)
{
$this->responseObject = $obj;
}
/**
* Gets the deseralized response object (during deserialization)
*
* @return mixed the deserialized response object
*/
public function getResponseObject()
{
return $this->responseObject;
}
}
@@ -0,0 +1,388 @@
<?php
/**
* Configuration
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client;
/**
* Configuration Class Doc Comment
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
$GLOBALS['version'] = '8.4.2';
class Configuration
{
private static $defaultConfiguration;
/**
* Associate array to store API key(s)
*
* @var string[]
*/
protected $apiKeys = [];
/**
* Associate array to store API prefix (e.g. Bearer)
*
* @var string[]
*/
protected $apiKeyPrefixes = [];
/**
* Access token for OAuth
*
* @var string
*/
protected $accessToken = '';
/**
* Username for HTTP basic authentication
*
* @var string
*/
protected $username = '';
/**
* Password for HTTP basic authentication
*
* @var string
*/
protected $password = '';
/**
* The host
*
* @var string
*/
protected $host = 'https://api.sendinblue.com/v3';
/**
* User agent of the HTTP request, set to "PHP-Swagger" by default
*
* @var string
*/
protected $userAgent = 'Swagger-Codegen/1.0.0/php';
/**
* Debug switch (default set to false)
*
* @var bool
*/
protected $debug = \false;
/**
* Debug file location (log to STDOUT by default)
*
* @var string
*/
protected $debugFile = 'php://output';
/**
* Debug file location (log to STDOUT by default)
*
* @var string
*/
protected $tempFolderPath;
/**
* Constructor
*/
public function __construct()
{
$this->tempFolderPath = \sys_get_temp_dir();
$this->userAgent = 'sendinblue_clientAPI/v' . $GLOBALS['version'] . '/php';
}
/**
* Sets API key
*
* @param string $apiKeyIdentifier API key identifier (authentication scheme)
* @param string $key API key or token
*
* @return $this
*/
public function setApiKey($apiKeyIdentifier, $key)
{
$this->apiKeys[$apiKeyIdentifier] = $key;
return $this;
}
/**
* Gets API key
*
* @param string $apiKeyIdentifier API key identifier (authentication scheme)
*
* @return string API key or token
*/
public function getApiKey($apiKeyIdentifier)
{
return isset($this->apiKeys[$apiKeyIdentifier]) ? $this->apiKeys[$apiKeyIdentifier] : null;
}
/**
* Sets the prefix for API key (e.g. Bearer)
*
* @param string $apiKeyIdentifier API key identifier (authentication scheme)
* @param string $prefix API key prefix, e.g. Bearer
*
* @return $this
*/
public function setApiKeyPrefix($apiKeyIdentifier, $prefix)
{
$this->apiKeyPrefixes[$apiKeyIdentifier] = $prefix;
return $this;
}
/**
* Gets API key prefix
*
* @param string $apiKeyIdentifier API key identifier (authentication scheme)
*
* @return string
*/
public function getApiKeyPrefix($apiKeyIdentifier)
{
return isset($this->apiKeyPrefixes[$apiKeyIdentifier]) ? $this->apiKeyPrefixes[$apiKeyIdentifier] : null;
}
/**
* Sets the access token for OAuth
*
* @param string $accessToken Token for OAuth
*
* @return $this
*/
public function setAccessToken($accessToken)
{
$this->accessToken = $accessToken;
return $this;
}
/**
* Gets the access token for OAuth
*
* @return string Access token for OAuth
*/
public function getAccessToken()
{
return $this->accessToken;
}
/**
* Sets the username for HTTP basic authentication
*
* @param string $username Username for HTTP basic authentication
*
* @return $this
*/
public function setUsername($username)
{
$this->username = $username;
return $this;
}
/**
* Gets the username for HTTP basic authentication
*
* @return string Username for HTTP basic authentication
*/
public function getUsername()
{
return $this->username;
}
/**
* Sets the password for HTTP basic authentication
*
* @param string $password Password for HTTP basic authentication
*
* @return $this
*/
public function setPassword($password)
{
$this->password = $password;
return $this;
}
/**
* Gets the password for HTTP basic authentication
*
* @return string Password for HTTP basic authentication
*/
public function getPassword()
{
return $this->password;
}
/**
* Sets the host
*
* @param string $host Host
*
* @return $this
*/
public function setHost($host)
{
$this->host = $host;
return $this;
}
/**
* Gets the host
*
* @return string Host
*/
public function getHost()
{
return $this->host;
}
/**
* Sets the user agent of the api client
*
* @param string $userAgent the user agent of the api client
*
* @throws \InvalidArgumentException
* @return $this
*/
public function setUserAgent($userAgent)
{
if (!\is_string($userAgent)) {
throw new \InvalidArgumentException('User-agent must be a string.');
}
$this->userAgent = $userAgent;
return $this;
}
/**
* Gets the user agent of the api client
*
* @return string user agent
*/
public function getUserAgent()
{
return $this->userAgent;
}
/**
* Sets debug flag
*
* @param bool $debug Debug flag
*
* @return $this
*/
public function setDebug($debug)
{
$this->debug = $debug;
return $this;
}
/**
* Gets the debug flag
*
* @return bool
*/
public function getDebug()
{
return $this->debug;
}
/**
* Sets the debug file
*
* @param string $debugFile Debug file
*
* @return $this
*/
public function setDebugFile($debugFile)
{
$this->debugFile = $debugFile;
return $this;
}
/**
* Gets the debug file
*
* @return string
*/
public function getDebugFile()
{
return $this->debugFile;
}
/**
* Sets the temp folder path
*
* @param string $tempFolderPath Temp folder path
*
* @return $this
*/
public function setTempFolderPath($tempFolderPath)
{
$this->tempFolderPath = $tempFolderPath;
return $this;
}
/**
* Gets the temp folder path
*
* @return string Temp folder path
*/
public function getTempFolderPath()
{
return $this->tempFolderPath;
}
/**
* Gets the default configuration instance
*
* @return Configuration
*/
public static function getDefaultConfiguration()
{
if (self::$defaultConfiguration === null) {
self::$defaultConfiguration = new \WPMailSMTP\Vendor\SendinBlue\Client\Configuration();
}
return self::$defaultConfiguration;
}
/**
* Sets the detault configuration instance
*
* @param Configuration $config An instance of the Configuration Object
*
* @return void
*/
public static function setDefaultConfiguration(\WPMailSMTP\Vendor\SendinBlue\Client\Configuration $config)
{
self::$defaultConfiguration = $config;
}
/**
* Gets the essential information for debugging
*
* @return string The report for debugging
*/
public static function toDebugReport()
{
$report = 'PHP SDK (SendinBlue\\Client) Debug Report:' . \PHP_EOL;
$report .= ' OS: ' . \php_uname() . \PHP_EOL;
$report .= ' PHP Version: ' . \PHP_VERSION . \PHP_EOL;
$report .= ' OpenAPI Spec Version: 3.0.0' . \PHP_EOL;
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . \PHP_EOL;
return $report;
}
/**
* Get API key (with prefix if set)
*
* @param string $apiKeyIdentifier name of apikey
*
* @return string API key with the prefix
*/
public function getApiKeyWithPrefix($apiKeyIdentifier)
{
$prefix = $this->getApiKeyPrefix($apiKeyIdentifier);
$apiKey = $this->getApiKey($apiKeyIdentifier);
if ($apiKey === null) {
return null;
}
if ($prefix === null) {
$keyWithPrefix = $apiKey;
} else {
$keyWithPrefix = $prefix . ' ' . $apiKey;
}
return $keyWithPrefix;
}
}
@@ -0,0 +1,99 @@
<?php
/**
* ApiException
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client;
use Exception;
/**
* ApiException Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class HeaderSelector
{
/**
* @param string[] $accept
* @param string[] $contentTypes
* @return array
*/
public function selectHeaders($accept, $contentTypes)
{
$headers = [];
$accept = $this->selectAcceptHeader($accept);
if ($accept !== null) {
$headers['Accept'] = $accept;
}
$headers['Content-Type'] = $this->selectContentTypeHeader($contentTypes);
return $headers;
}
/**
* @param string[] $accept
* @return array
*/
public function selectHeadersForMultipart($accept)
{
$headers = $this->selectHeaders($accept, []);
unset($headers['Content-Type']);
return $headers;
}
/**
* Return the header 'Accept' based on an array of Accept provided
*
* @param string[] $accept Array of header
*
* @return string Accept (e.g. application/json)
*/
private function selectAcceptHeader($accept)
{
if (\count($accept) === 0 || \count($accept) === 1 && $accept[0] === '') {
return null;
} elseif (\preg_grep("/application\\/json/i", $accept)) {
return 'application/json';
} else {
return \implode(',', $accept);
}
}
/**
* Return the content type based on an array of content-type provided
*
* @param string[] $contentType Array fo content-type
*
* @return string Content-Type (e.g. application/json)
*/
private function selectContentTypeHeader($contentType)
{
if (\count($contentType) === 0 || \count($contentType) === 1 && $contentType[0] === '') {
return 'application/json';
} elseif (\preg_grep("/application\\/json/i", $contentType)) {
return 'application/json';
} else {
return \implode(',', $contentType);
}
}
}
@@ -0,0 +1,453 @@
<?php
/**
* AbTestCampaignResult
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* AbTestCampaignResult Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class AbTestCampaignResult implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'abTestCampaignResult';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['winningVersion' => 'string', 'winningCriteria' => 'string', 'winningSubjectLine' => 'string', 'openRate' => 'string', 'clickRate' => 'string', 'winningVersionRate' => 'string', 'statistics' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\AbTestCampaignResultStatistics', 'clickedLinks' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\AbTestCampaignResultClickedLinks'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['winningVersion' => null, 'winningCriteria' => null, 'winningSubjectLine' => null, 'openRate' => null, 'clickRate' => null, 'winningVersionRate' => null, 'statistics' => null, 'clickedLinks' => 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 = ['winningVersion' => 'winningVersion', 'winningCriteria' => 'winningCriteria', 'winningSubjectLine' => 'winningSubjectLine', 'openRate' => 'openRate', 'clickRate' => 'clickRate', 'winningVersionRate' => 'winningVersionRate', 'statistics' => 'statistics', 'clickedLinks' => 'clickedLinks'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['winningVersion' => 'setWinningVersion', 'winningCriteria' => 'setWinningCriteria', 'winningSubjectLine' => 'setWinningSubjectLine', 'openRate' => 'setOpenRate', 'clickRate' => 'setClickRate', 'winningVersionRate' => 'setWinningVersionRate', 'statistics' => 'setStatistics', 'clickedLinks' => 'setClickedLinks'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['winningVersion' => 'getWinningVersion', 'winningCriteria' => 'getWinningCriteria', 'winningSubjectLine' => 'getWinningSubjectLine', 'openRate' => 'getOpenRate', 'clickRate' => 'getClickRate', 'winningVersionRate' => 'getWinningVersionRate', 'statistics' => 'getStatistics', 'clickedLinks' => 'getClickedLinks'];
/**
* 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 WINNING_VERSION_NOT_AVAILABLE = 'notAvailable';
const WINNING_VERSION_PENDING = 'pending';
const WINNING_VERSION_TIE = 'tie';
const WINNING_VERSION_A = 'A';
const WINNING_VERSION_B = 'B';
const WINNING_CRITERIA_OPEN = 'Open';
const WINNING_CRITERIA_CLICK = 'Click';
/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getWinningVersionAllowableValues()
{
return [self::WINNING_VERSION_NOT_AVAILABLE, self::WINNING_VERSION_PENDING, self::WINNING_VERSION_TIE, self::WINNING_VERSION_A, self::WINNING_VERSION_B];
}
/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getWinningCriteriaAllowableValues()
{
return [self::WINNING_CRITERIA_OPEN, self::WINNING_CRITERIA_CLICK];
}
/**
* 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['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['statistics'] = isset($data['statistics']) ? $data['statistics'] : null;
$this->container['clickedLinks'] = isset($data['clickedLinks']) ? $data['clickedLinks'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
$allowedValues = $this->getWinningVersionAllowableValues();
if (!\is_null($this->container['winningVersion']) && !\in_array($this->container['winningVersion'], $allowedValues, \true)) {
$invalidProperties[] = \sprintf("invalid value for 'winningVersion', must be one of '%s'", \implode("', '", $allowedValues));
}
$allowedValues = $this->getWinningCriteriaAllowableValues();
if (!\is_null($this->container['winningCriteria']) && !\in_array($this->container['winningCriteria'], $allowedValues, \true)) {
$invalidProperties[] = \sprintf("invalid value for 'winningCriteria', 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 winningVersion
*
* @return string
*/
public function getWinningVersion()
{
return $this->container['winningVersion'];
}
/**
* Sets winningVersion
*
* @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.
*
* @return $this
*/
public function setWinningVersion($winningVersion)
{
$allowedValues = $this->getWinningVersionAllowableValues();
if (!\is_null($winningVersion) && !\in_array($winningVersion, $allowedValues, \true)) {
throw new \InvalidArgumentException(\sprintf("Invalid value for 'winningVersion', must be one of '%s'", \implode("', '", $allowedValues)));
}
$this->container['winningVersion'] = $winningVersion;
return $this;
}
/**
* Gets winningCriteria
*
* @return string
*/
public function getWinningCriteria()
{
return $this->container['winningCriteria'];
}
/**
* Sets winningCriteria
*
* @param string $winningCriteria Criteria choosen for winning version (Open/Click)
*
* @return $this
*/
public function setWinningCriteria($winningCriteria)
{
$allowedValues = $this->getWinningCriteriaAllowableValues();
if (!\is_null($winningCriteria) && !\in_array($winningCriteria, $allowedValues, \true)) {
throw new \InvalidArgumentException(\sprintf("Invalid value for 'winningCriteria', must be one of '%s'", \implode("', '", $allowedValues)));
}
$this->container['winningCriteria'] = $winningCriteria;
return $this;
}
/**
* Gets winningSubjectLine
*
* @return string
*/
public function getWinningSubjectLine()
{
return $this->container['winningSubjectLine'];
}
/**
* Sets winningSubjectLine
*
* @param string $winningSubjectLine Subject Line of current winning version
*
* @return $this
*/
public function setWinningSubjectLine($winningSubjectLine)
{
$this->container['winningSubjectLine'] = $winningSubjectLine;
return $this;
}
/**
* Gets openRate
*
* @return string
*/
public function getOpenRate()
{
return $this->container['openRate'];
}
/**
* Sets openRate
*
* @param string $openRate Open rate for current winning version
*
* @return $this
*/
public function setOpenRate($openRate)
{
$this->container['openRate'] = $openRate;
return $this;
}
/**
* Gets clickRate
*
* @return string
*/
public function getClickRate()
{
return $this->container['clickRate'];
}
/**
* Sets clickRate
*
* @param string $clickRate Click rate for current winning version
*
* @return $this
*/
public function setClickRate($clickRate)
{
$this->container['clickRate'] = $clickRate;
return $this;
}
/**
* Gets winningVersionRate
*
* @return string
*/
public function getWinningVersionRate()
{
return $this->container['winningVersionRate'];
}
/**
* Sets winningVersionRate
*
* @param string $winningVersionRate Open/Click rate for the winner version
*
* @return $this
*/
public function setWinningVersionRate($winningVersionRate)
{
$this->container['winningVersionRate'] = $winningVersionRate;
return $this;
}
/**
* Gets statistics
*
* @return \SendinBlue\Client\Model\AbTestCampaignResultStatistics
*/
public function getStatistics()
{
return $this->container['statistics'];
}
/**
* Sets statistics
*
* @param \SendinBlue\Client\Model\AbTestCampaignResultStatistics $statistics statistics
*
* @return $this
*/
public function setStatistics($statistics)
{
$this->container['statistics'] = $statistics;
return $this;
}
/**
* Gets clickedLinks
*
* @return \SendinBlue\Client\Model\AbTestCampaignResultClickedLinks
*/
public function getClickedLinks()
{
return $this->container['clickedLinks'];
}
/**
* Sets clickedLinks
*
* @param \SendinBlue\Client\Model\AbTestCampaignResultClickedLinks $clickedLinks clickedLinks
*
* @return $this
*/
public function setClickedLinks($clickedLinks)
{
$this->container['clickedLinks'] = $clickedLinks;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,286 @@
<?php
/**
* AbTestCampaignResultClickedLinks
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* AbTestCampaignResultClickedLinks Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class AbTestCampaignResultClickedLinks implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'abTestCampaignResult_clickedLinks';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['versionA' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\AbTestVersionClicks', 'versionB' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\AbTestVersionClicks'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['versionA' => null, 'versionB' => 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 = ['versionA' => 'Version A', 'versionB' => 'Version B'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['versionA' => 'setVersionA', 'versionB' => 'setVersionB'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['versionA' => 'getVersionA', 'versionB' => 'getVersionB'];
/**
* 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['versionA'] = isset($data['versionA']) ? $data['versionA'] : null;
$this->container['versionB'] = isset($data['versionB']) ? $data['versionB'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['versionA'] === null) {
$invalidProperties[] = "'versionA' can't be null";
}
if ($this->container['versionB'] === null) {
$invalidProperties[] = "'versionB' 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 versionA
*
* @return \SendinBlue\Client\Model\AbTestVersionClicks
*/
public function getVersionA()
{
return $this->container['versionA'];
}
/**
* Sets versionA
*
* @param \SendinBlue\Client\Model\AbTestVersionClicks $versionA versionA
*
* @return $this
*/
public function setVersionA($versionA)
{
$this->container['versionA'] = $versionA;
return $this;
}
/**
* Gets versionB
*
* @return \SendinBlue\Client\Model\AbTestVersionClicks
*/
public function getVersionB()
{
return $this->container['versionB'];
}
/**
* Sets versionB
*
* @param \SendinBlue\Client\Model\AbTestVersionClicks $versionB versionB
*
* @return $this
*/
public function setVersionB($versionB)
{
$this->container['versionB'] = $versionB;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,386 @@
<?php
/**
* AbTestCampaignResultStatistics
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* AbTestCampaignResultStatistics Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class AbTestCampaignResultStatistics implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'abTestCampaignResult_statistics';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['openers' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\AbTestVersionStats', 'clicks' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\AbTestVersionStats', 'unsubscribed' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\AbTestVersionStats', 'hardBounces' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\AbTestVersionStats', 'softBounces' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\AbTestVersionStats', 'complaints' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\AbTestVersionStats'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['openers' => null, 'clicks' => null, 'unsubscribed' => null, 'hardBounces' => null, 'softBounces' => null, 'complaints' => 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 = ['openers' => 'openers', 'clicks' => 'clicks', 'unsubscribed' => 'unsubscribed', 'hardBounces' => 'hardBounces', 'softBounces' => 'softBounces', 'complaints' => 'complaints'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['openers' => 'setOpeners', 'clicks' => 'setClicks', 'unsubscribed' => 'setUnsubscribed', 'hardBounces' => 'setHardBounces', 'softBounces' => 'setSoftBounces', 'complaints' => 'setComplaints'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['openers' => 'getOpeners', 'clicks' => 'getClicks', 'unsubscribed' => 'getUnsubscribed', 'hardBounces' => 'getHardBounces', 'softBounces' => 'getSoftBounces', 'complaints' => 'getComplaints'];
/**
* 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['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['complaints'] = isset($data['complaints']) ? $data['complaints'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['openers'] === null) {
$invalidProperties[] = "'openers' can't be null";
}
if ($this->container['clicks'] === null) {
$invalidProperties[] = "'clicks' can't be null";
}
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['softBounces'] === null) {
$invalidProperties[] = "'softBounces' can't be null";
}
if ($this->container['complaints'] === null) {
$invalidProperties[] = "'complaints' 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 openers
*
* @return \SendinBlue\Client\Model\AbTestVersionStats
*/
public function getOpeners()
{
return $this->container['openers'];
}
/**
* Sets openers
*
* @param \SendinBlue\Client\Model\AbTestVersionStats $openers openers
*
* @return $this
*/
public function setOpeners($openers)
{
$this->container['openers'] = $openers;
return $this;
}
/**
* Gets clicks
*
* @return \SendinBlue\Client\Model\AbTestVersionStats
*/
public function getClicks()
{
return $this->container['clicks'];
}
/**
* Sets clicks
*
* @param \SendinBlue\Client\Model\AbTestVersionStats $clicks clicks
*
* @return $this
*/
public function setClicks($clicks)
{
$this->container['clicks'] = $clicks;
return $this;
}
/**
* Gets unsubscribed
*
* @return \SendinBlue\Client\Model\AbTestVersionStats
*/
public function getUnsubscribed()
{
return $this->container['unsubscribed'];
}
/**
* Sets unsubscribed
*
* @param \SendinBlue\Client\Model\AbTestVersionStats $unsubscribed unsubscribed
*
* @return $this
*/
public function setUnsubscribed($unsubscribed)
{
$this->container['unsubscribed'] = $unsubscribed;
return $this;
}
/**
* Gets hardBounces
*
* @return \SendinBlue\Client\Model\AbTestVersionStats
*/
public function getHardBounces()
{
return $this->container['hardBounces'];
}
/**
* Sets hardBounces
*
* @param \SendinBlue\Client\Model\AbTestVersionStats $hardBounces hardBounces
*
* @return $this
*/
public function setHardBounces($hardBounces)
{
$this->container['hardBounces'] = $hardBounces;
return $this;
}
/**
* Gets softBounces
*
* @return \SendinBlue\Client\Model\AbTestVersionStats
*/
public function getSoftBounces()
{
return $this->container['softBounces'];
}
/**
* Sets softBounces
*
* @param \SendinBlue\Client\Model\AbTestVersionStats $softBounces softBounces
*
* @return $this
*/
public function setSoftBounces($softBounces)
{
$this->container['softBounces'] = $softBounces;
return $this;
}
/**
* Gets complaints
*
* @return \SendinBlue\Client\Model\AbTestVersionStats
*/
public function getComplaints()
{
return $this->container['complaints'];
}
/**
* Sets complaints
*
* @param \SendinBlue\Client\Model\AbTestVersionStats $complaints complaints
*
* @return $this
*/
public function setComplaints($complaints)
{
$this->container['complaints'] = $complaints;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,311 @@
<?php
/**
* AbTestVersionClicksInner
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* AbTestVersionClicksInner Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class AbTestVersionClicksInner implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'abTestVersionClicks_inner';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['link' => 'string', 'clicksCount' => 'float', 'clickRate' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['link' => null, 'clicksCount' => 'int64', 'clickRate' => 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 = ['link' => 'link', 'clicksCount' => 'clicksCount', 'clickRate' => 'clickRate'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['link' => 'setLink', 'clicksCount' => 'setClicksCount', 'clickRate' => 'setClickRate'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['link' => 'getLink', 'clicksCount' => 'getClicksCount', 'clickRate' => 'getClickRate'];
/**
* 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['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;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
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['clickRate'] === null) {
$invalidProperties[] = "'clickRate' 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 link
*
* @return string
*/
public function getLink()
{
return $this->container['link'];
}
/**
* Sets link
*
* @param string $link URL of the link
*
* @return $this
*/
public function setLink($link)
{
$this->container['link'] = $link;
return $this;
}
/**
* Gets clicksCount
*
* @return float
*/
public function getClicksCount()
{
return $this->container['clicksCount'];
}
/**
* Sets clicksCount
*
* @param float $clicksCount Number of times a link is clicked
*
* @return $this
*/
public function setClicksCount($clicksCount)
{
$this->container['clicksCount'] = $clicksCount;
return $this;
}
/**
* Gets clickRate
*
* @return string
*/
public function getClickRate()
{
return $this->container['clickRate'];
}
/**
* Sets clickRate
*
* @param string $clickRate Percentage of clicks of link with respect to total clicks
*
* @return $this
*/
public function setClickRate($clickRate)
{
$this->container['clickRate'] = $clickRate;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,287 @@
<?php
/**
* AbTestVersionStats
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* AbTestVersionStats Class Doc Comment
*
* @category Class
* @description Percentage of a particular event for both versions
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class AbTestVersionStats implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'abTestVersionStats';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['versionA' => 'string', 'versionB' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['versionA' => null, 'versionB' => 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 = ['versionA' => 'Version A', 'versionB' => 'Version B'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['versionA' => 'setVersionA', 'versionB' => 'setVersionB'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['versionA' => 'getVersionA', 'versionB' => 'getVersionB'];
/**
* 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['versionA'] = isset($data['versionA']) ? $data['versionA'] : null;
$this->container['versionB'] = isset($data['versionB']) ? $data['versionB'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['versionA'] === null) {
$invalidProperties[] = "'versionA' can't be null";
}
if ($this->container['versionB'] === null) {
$invalidProperties[] = "'versionB' 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 versionA
*
* @return string
*/
public function getVersionA()
{
return $this->container['versionA'];
}
/**
* Sets versionA
*
* @param string $versionA percentage of an event for version A
*
* @return $this
*/
public function setVersionA($versionA)
{
$this->container['versionA'] = $versionA;
return $this;
}
/**
* Gets versionB
*
* @return string
*/
public function getVersionB()
{
return $this->container['versionB'];
}
/**
* Sets versionB
*
* @param string $versionB percentage of an event for version B
*
* @return $this
*/
public function setVersionB($versionB)
{
$this->container['versionB'] = $versionB;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,258 @@
<?php
/**
* AddChildDomain
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* AddChildDomain Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class AddChildDomain implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'addChildDomain';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['domain' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['domain' => 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 = ['domain' => 'domain'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['domain' => 'setDomain'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['domain' => 'getDomain'];
/**
* 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['domain'] = isset($data['domain']) ? $data['domain'] : 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 domain
*
* @return string
*/
public function getDomain()
{
return $this->container['domain'];
}
/**
* Sets domain
*
* @param string $domain Sender domain to add for a specific child account
*
* @return $this
*/
public function setDomain($domain)
{
$this->container['domain'] = $domain;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,280 @@
<?php
/**
* AddContactToList
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* AddContactToList Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class AddContactToList implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'addContactToList';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['emails' => 'string[]', 'ids' => 'int[]'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['emails' => 'email', 'ids' => '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 = ['emails' => 'emails', 'ids' => 'ids'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['emails' => 'setEmails', 'ids' => 'setIds'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['emails' => 'getEmails', 'ids' => 'getIds'];
/**
* 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['emails'] = isset($data['emails']) ? $data['emails'] : null;
$this->container['ids'] = isset($data['ids']) ? $data['ids'] : 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 emails
*
* @return string[]
*/
public function getEmails()
{
return $this->container['emails'];
}
/**
* 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.
*
* @return $this
*/
public function setEmails($emails)
{
$this->container['emails'] = $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.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,280 @@
<?php
/**
* AddCredits
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* AddCredits Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class AddCredits implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'addCredits';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['sms' => 'int', 'email' => 'int'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['sms' => 'int64', '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 = ['sms' => 'sms', 'email' => 'email'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['sms' => 'setSms', 'email' => 'setEmail'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['sms' => 'getSms', '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['sms'] = isset($data['sms']) ? $data['sms'] : 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 sms
*
* @return int
*/
public function getSms()
{
return $this->container['sms'];
}
/**
* Sets sms
*
* @param int $sms Required if email credits are empty. SMS credits to be added to the child account
*
* @return $this
*/
public function setSms($sms)
{
$this->container['sms'] = $sms;
return $this;
}
/**
* Gets email
*
* @return int
*/
public function getEmail()
{
return $this->container['email'];
}
/**
* Sets email
*
* @param int $email Required if sms credits are empty. Email credits to be added to the child account
*
* @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
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,261 @@
<?php
/**
* BlockDomain
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* BlockDomain Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class BlockDomain implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'blockDomain';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['domain' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['domain' => 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 = ['domain' => 'domain'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['domain' => 'setDomain'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['domain' => 'getDomain'];
/**
* 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['domain'] = isset($data['domain']) ? $data['domain'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['domain'] === null) {
$invalidProperties[] = "'domain' 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 domain
*
* @return string
*/
public function getDomain()
{
return $this->container['domain'];
}
/**
* Sets domain
*
* @param string $domain name of the domain to be blocked
*
* @return $this
*/
public function setDomain($domain)
{
$this->container['domain'] = $domain;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,493 @@
<?php
/**
* Body
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* Body Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class Body implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'body';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['name' => 'string', 'duration' => 'int', 'taskTypeId' => 'string', 'date' => '\\DateTime', 'notes' => 'string', 'done' => 'bool', 'assignToId' => 'string', 'contactsIds' => 'int[]', 'dealsIds' => 'string[]', 'companiesIds' => 'string[]', 'reminder' => 'WPMailSMTP\\Vendor\\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
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,487 @@
<?php
/**
* Body1
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* Body1 Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class Body1 implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'body_1';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['name' => 'string', 'duration' => 'int', 'taskTypeId' => 'string', 'date' => '\\DateTime', 'notes' => 'string', 'done' => 'bool', 'assignToId' => 'string', 'contactsIds' => 'int[]', 'dealsIds' => 'string[]', 'companiesIds' => 'string[]', 'reminder' => 'WPMailSMTP\\Vendor\\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
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,330 @@
<?php
/**
* Body10
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* Body10 Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class Body10 implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'body_10';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['visitorId' => 'string', 'text' => 'string', 'agentId' => 'string', 'groupId' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['visitorId' => null, 'text' => null, 'agentId' => null, 'groupId' => 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 = ['visitorId' => 'visitorId', 'text' => 'text', 'agentId' => 'agentId', 'groupId' => 'groupId'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['visitorId' => 'setVisitorId', 'text' => 'setText', 'agentId' => 'setAgentId', 'groupId' => 'setGroupId'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['visitorId' => 'getVisitorId', 'text' => 'getText', 'agentId' => 'getAgentId', 'groupId' => 'getGroupId'];
/**
* 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['visitorId'] = isset($data['visitorId']) ? $data['visitorId'] : null;
$this->container['text'] = isset($data['text']) ? $data['text'] : null;
$this->container['agentId'] = isset($data['agentId']) ? $data['agentId'] : null;
$this->container['groupId'] = isset($data['groupId']) ? $data['groupId'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['visitorId'] === null) {
$invalidProperties[] = "'visitorId' can't be null";
}
if ($this->container['text'] === null) {
$invalidProperties[] = "'text' 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 visitorId
*
* @return string
*/
public function getVisitorId()
{
return $this->container['visitorId'];
}
/**
* Sets visitorId
*
* @param string $visitorId visitor’s ID received <a href=\"https://developers.sendinblue.com/docs/conversations-webhooks\">from a webhook</a> or generated by you to <a href=\"https://developers.sendinblue.com/docs/customize-the-widget#identifying-existing-users\">bind existing user account to Conversations</a>
*
* @return $this
*/
public function setVisitorId($visitorId)
{
$this->container['visitorId'] = $visitorId;
return $this;
}
/**
* Gets text
*
* @return string
*/
public function getText()
{
return $this->container['text'];
}
/**
* Sets text
*
* @param string $text message text
*
* @return $this
*/
public function setText($text)
{
$this->container['text'] = $text;
return $this;
}
/**
* Gets agentId
*
* @return string
*/
public function getAgentId()
{
return $this->container['agentId'];
}
/**
* Sets agentId
*
* @param string $agentId agent ID. It can be found on agent’s page or received <a href=\"https://developers.sendinblue.com/docs/conversations-webhooks\">from a webhook</a>. Optional if `groupId` is set.
*
* @return $this
*/
public function setAgentId($agentId)
{
$this->container['agentId'] = $agentId;
return $this;
}
/**
* Gets groupId
*
* @return string
*/
public function getGroupId()
{
return $this->container['groupId'];
}
/**
* Sets groupId
*
* @param string $groupId group ID. It can be found on group’s page. Optional if `agentId` is set.
*
* @return $this
*/
public function setGroupId($groupId)
{
$this->container['groupId'] = $groupId;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,261 @@
<?php
/**
* Body11
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* Body11 Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class Body11 implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'body_11';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['text' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['text' => 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'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['text' => 'setText'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['text' => 'getText'];
/**
* 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;
}
/**
* 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";
}
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 edited message text
*
* @return $this
*/
public function setText($text)
{
$this->container['text'] = $text;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,324 @@
<?php
/**
* Body12
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* Body12 Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class Body12 implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'body_12';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['agentId' => 'string', 'receivedFrom' => 'string', 'agentEmail' => 'string', 'agentName' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['agentId' => null, 'receivedFrom' => null, 'agentEmail' => 'email', 'agentName' => 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 = ['agentId' => 'agentId', 'receivedFrom' => 'receivedFrom', 'agentEmail' => 'agentEmail', 'agentName' => 'agentName'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['agentId' => 'setAgentId', 'receivedFrom' => 'setReceivedFrom', 'agentEmail' => 'setAgentEmail', 'agentName' => 'setAgentName'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['agentId' => 'getAgentId', 'receivedFrom' => 'getReceivedFrom', 'agentEmail' => 'getAgentEmail', 'agentName' => 'getAgentName'];
/**
* 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['agentId'] = isset($data['agentId']) ? $data['agentId'] : null;
$this->container['receivedFrom'] = isset($data['receivedFrom']) ? $data['receivedFrom'] : null;
$this->container['agentEmail'] = isset($data['agentEmail']) ? $data['agentEmail'] : null;
$this->container['agentName'] = isset($data['agentName']) ? $data['agentName'] : 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 agentId
*
* @return string
*/
public function getAgentId()
{
return $this->container['agentId'];
}
/**
* Sets agentId
*
* @param string $agentId agent ID. It can be found on agent’s page or received <a href=\"https://developers.sendinblue.com/docs/conversations-webhooks\">from a webhook</a>. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required).
*
* @return $this
*/
public function setAgentId($agentId)
{
$this->container['agentId'] = $agentId;
return $this;
}
/**
* Gets receivedFrom
*
* @return string
*/
public function getReceivedFrom()
{
return $this->container['receivedFrom'];
}
/**
* Sets receivedFrom
*
* @param string $receivedFrom mark your messages to distinguish messages created by you from the others.
*
* @return $this
*/
public function setReceivedFrom($receivedFrom)
{
$this->container['receivedFrom'] = $receivedFrom;
return $this;
}
/**
* Gets agentEmail
*
* @return string
*/
public function getAgentEmail()
{
return $this->container['agentEmail'];
}
/**
* Sets agentEmail
*
* @param string $agentEmail agent email. When sending online pings from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. If there’s no agent with the specified email address in your Sendinblue organization, a dummy agent will be created automatically.
*
* @return $this
*/
public function setAgentEmail($agentEmail)
{
$this->container['agentEmail'] = $agentEmail;
return $this;
}
/**
* Gets agentName
*
* @return string
*/
public function getAgentName()
{
return $this->container['agentName'];
}
/**
* Sets agentName
*
* @param string $agentName agent name.
*
* @return $this
*/
public function setAgentName($agentName)
{
$this->container['agentName'] = $agentName;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,324 @@
<?php
/**
* Body2
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* Body2 Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class Body2 implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'body_2';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['linkContactIds' => 'int[]', 'unlinkContactIds' => 'int[]', 'linkDealsIds' => 'string[]', 'unlinkDealsIds' => 'string[]'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['linkContactIds' => 'int64', 'unlinkContactIds' => 'int64', 'linkDealsIds' => null, 'unlinkDealsIds' => 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 = ['linkContactIds' => 'linkContactIds', 'unlinkContactIds' => 'unlinkContactIds', 'linkDealsIds' => 'linkDealsIds', 'unlinkDealsIds' => 'unlinkDealsIds'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['linkContactIds' => 'setLinkContactIds', 'unlinkContactIds' => 'setUnlinkContactIds', 'linkDealsIds' => 'setLinkDealsIds', 'unlinkDealsIds' => 'setUnlinkDealsIds'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['linkContactIds' => 'getLinkContactIds', 'unlinkContactIds' => 'getUnlinkContactIds', 'linkDealsIds' => 'getLinkDealsIds', 'unlinkDealsIds' => 'getUnlinkDealsIds'];
/**
* 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['linkContactIds'] = isset($data['linkContactIds']) ? $data['linkContactIds'] : null;
$this->container['unlinkContactIds'] = isset($data['unlinkContactIds']) ? $data['unlinkContactIds'] : null;
$this->container['linkDealsIds'] = isset($data['linkDealsIds']) ? $data['linkDealsIds'] : null;
$this->container['unlinkDealsIds'] = isset($data['unlinkDealsIds']) ? $data['unlinkDealsIds'] : 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 linkContactIds
*
* @return int[]
*/
public function getLinkContactIds()
{
return $this->container['linkContactIds'];
}
/**
* Sets linkContactIds
*
* @param int[] $linkContactIds Contact ids for contacts to be linked with company
*
* @return $this
*/
public function setLinkContactIds($linkContactIds)
{
$this->container['linkContactIds'] = $linkContactIds;
return $this;
}
/**
* Gets unlinkContactIds
*
* @return int[]
*/
public function getUnlinkContactIds()
{
return $this->container['unlinkContactIds'];
}
/**
* Sets unlinkContactIds
*
* @param int[] $unlinkContactIds Contact ids for contacts to be unlinked from company
*
* @return $this
*/
public function setUnlinkContactIds($unlinkContactIds)
{
$this->container['unlinkContactIds'] = $unlinkContactIds;
return $this;
}
/**
* Gets linkDealsIds
*
* @return string[]
*/
public function getLinkDealsIds()
{
return $this->container['linkDealsIds'];
}
/**
* Sets linkDealsIds
*
* @param string[] $linkDealsIds Deals ids for deals to be linked with company
*
* @return $this
*/
public function setLinkDealsIds($linkDealsIds)
{
$this->container['linkDealsIds'] = $linkDealsIds;
return $this;
}
/**
* Gets unlinkDealsIds
*
* @return string[]
*/
public function getUnlinkDealsIds()
{
return $this->container['unlinkDealsIds'];
}
/**
* Sets unlinkDealsIds
*
* @param string[] $unlinkDealsIds Deals ids for deals to be unlinked from company
*
* @return $this
*/
public function setUnlinkDealsIds($unlinkDealsIds)
{
$this->container['unlinkDealsIds'] = $unlinkDealsIds;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,283 @@
<?php
/**
* Body3
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* Body3 Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class Body3 implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'body_3';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['name' => 'string', 'attributes' => 'object'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['name' => null, 'attributes' => 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', 'attributes' => 'attributes'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['name' => 'setName', 'attributes' => 'setAttributes'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['name' => 'getName', 'attributes' => 'getAttributes'];
/**
* 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['attributes'] = isset($data['attributes']) ? $data['attributes'] : 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";
}
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 deal
*
* @return $this
*/
public function setName($name)
{
$this->container['name'] = $name;
return $this;
}
/**
* Gets attributes
*
* @return object
*/
public function getAttributes()
{
return $this->container['attributes'];
}
/**
* Sets attributes
*
* @param object $attributes Attributes fo\\r deal creation
*
* @return $this
*/
public function setAttributes($attributes)
{
$this->container['attributes'] = $attributes;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,280 @@
<?php
/**
* Body4
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* Body4 Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class Body4 implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'body_4';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['name' => 'string', 'attributes' => 'object'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['name' => null, 'attributes' => 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', 'attributes' => 'attributes'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['name' => 'setName', 'attributes' => 'setAttributes'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['name' => 'getName', 'attributes' => 'getAttributes'];
/**
* 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['attributes'] = isset($data['attributes']) ? $data['attributes'] : 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 deal
*
* @return $this
*/
public function setName($name)
{
$this->container['name'] = $name;
return $this;
}
/**
* Gets attributes
*
* @return object
*/
public function getAttributes()
{
return $this->container['attributes'];
}
/**
* Sets attributes
*
* @param object $attributes Attributes for deal update
*
* @return $this
*/
public function setAttributes($attributes)
{
$this->container['attributes'] = $attributes;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,324 @@
<?php
/**
* Body5
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* Body5 Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class Body5 implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'body_5';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['linkContactIds' => 'int[]', 'unlinkContactIds' => 'int[]', 'linkCompanyIds' => 'string[]', 'unlinkCompanyIds' => 'string[]'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['linkContactIds' => 'int64', 'unlinkContactIds' => 'int64', 'linkCompanyIds' => null, 'unlinkCompanyIds' => 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 = ['linkContactIds' => 'linkContactIds', 'unlinkContactIds' => 'unlinkContactIds', 'linkCompanyIds' => 'linkCompanyIds', 'unlinkCompanyIds' => 'unlinkCompanyIds'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['linkContactIds' => 'setLinkContactIds', 'unlinkContactIds' => 'setUnlinkContactIds', 'linkCompanyIds' => 'setLinkCompanyIds', 'unlinkCompanyIds' => 'setUnlinkCompanyIds'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['linkContactIds' => 'getLinkContactIds', 'unlinkContactIds' => 'getUnlinkContactIds', 'linkCompanyIds' => 'getLinkCompanyIds', 'unlinkCompanyIds' => 'getUnlinkCompanyIds'];
/**
* 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['linkContactIds'] = isset($data['linkContactIds']) ? $data['linkContactIds'] : null;
$this->container['unlinkContactIds'] = isset($data['unlinkContactIds']) ? $data['unlinkContactIds'] : null;
$this->container['linkCompanyIds'] = isset($data['linkCompanyIds']) ? $data['linkCompanyIds'] : null;
$this->container['unlinkCompanyIds'] = isset($data['unlinkCompanyIds']) ? $data['unlinkCompanyIds'] : 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 linkContactIds
*
* @return int[]
*/
public function getLinkContactIds()
{
return $this->container['linkContactIds'];
}
/**
* Sets linkContactIds
*
* @param int[] $linkContactIds Contact ids for contacts to be linked with deal
*
* @return $this
*/
public function setLinkContactIds($linkContactIds)
{
$this->container['linkContactIds'] = $linkContactIds;
return $this;
}
/**
* Gets unlinkContactIds
*
* @return int[]
*/
public function getUnlinkContactIds()
{
return $this->container['unlinkContactIds'];
}
/**
* Sets unlinkContactIds
*
* @param int[] $unlinkContactIds Contact ids for contacts to be unlinked from deal
*
* @return $this
*/
public function setUnlinkContactIds($unlinkContactIds)
{
$this->container['unlinkContactIds'] = $unlinkContactIds;
return $this;
}
/**
* Gets linkCompanyIds
*
* @return string[]
*/
public function getLinkCompanyIds()
{
return $this->container['linkCompanyIds'];
}
/**
* Sets linkCompanyIds
*
* @param string[] $linkCompanyIds Company ids to be linked with deal
*
* @return $this
*/
public function setLinkCompanyIds($linkCompanyIds)
{
$this->container['linkCompanyIds'] = $linkCompanyIds;
return $this;
}
/**
* Gets unlinkCompanyIds
*
* @return string[]
*/
public function getUnlinkCompanyIds()
{
return $this->container['unlinkCompanyIds'];
}
/**
* Sets unlinkCompanyIds
*
* @param string[] $unlinkCompanyIds Company ids to be unlinked from deal
*
* @return $this
*/
public function setUnlinkCompanyIds($unlinkCompanyIds)
{
$this->container['unlinkCompanyIds'] = $unlinkCompanyIds;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,493 @@
<?php
/**
* Body6
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* Body6 Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class Body6 implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'body_6';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['name' => 'string', 'duration' => 'int', 'taskTypeId' => 'string', 'date' => '\\DateTime', 'notes' => 'string', 'done' => 'bool', 'assignToId' => 'string', 'contactsIds' => 'int[]', 'dealsIds' => 'string[]', 'companiesIds' => 'string[]', 'reminder' => 'WPMailSMTP\\Vendor\\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 Body6., 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
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,456 @@
<?php
/**
* Body7
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* Body7 Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class Body7 implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'body_7';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['name' => 'string', 'duration' => 'int', 'taskTypeId' => 'string', 'date' => '\\DateTime', 'notes' => 'string', 'done' => 'bool', 'assignToId' => 'string', 'contactsIds' => 'int[]', 'dealsIds' => 'string[]', 'companiesIds' => 'string[]'];
/**
* 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];
/**
* 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'];
/**
* 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'];
/**
* 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'];
/**
* 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;
}
/**
* 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 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;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,374 @@
<?php
/**
* Body8
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* Body8 Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class Body8 implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'body_8';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['visitorId' => 'string', 'text' => 'string', 'agentId' => 'string', 'receivedFrom' => 'string', 'agentEmail' => 'string', 'agentName' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['visitorId' => null, 'text' => null, 'agentId' => null, 'receivedFrom' => null, 'agentEmail' => 'email', 'agentName' => 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 = ['visitorId' => 'visitorId', 'text' => 'text', 'agentId' => 'agentId', 'receivedFrom' => 'receivedFrom', 'agentEmail' => 'agentEmail', 'agentName' => 'agentName'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['visitorId' => 'setVisitorId', 'text' => 'setText', 'agentId' => 'setAgentId', 'receivedFrom' => 'setReceivedFrom', 'agentEmail' => 'setAgentEmail', 'agentName' => 'setAgentName'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['visitorId' => 'getVisitorId', 'text' => 'getText', 'agentId' => 'getAgentId', 'receivedFrom' => 'getReceivedFrom', 'agentEmail' => 'getAgentEmail', 'agentName' => 'getAgentName'];
/**
* 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['visitorId'] = isset($data['visitorId']) ? $data['visitorId'] : null;
$this->container['text'] = isset($data['text']) ? $data['text'] : null;
$this->container['agentId'] = isset($data['agentId']) ? $data['agentId'] : null;
$this->container['receivedFrom'] = isset($data['receivedFrom']) ? $data['receivedFrom'] : null;
$this->container['agentEmail'] = isset($data['agentEmail']) ? $data['agentEmail'] : null;
$this->container['agentName'] = isset($data['agentName']) ? $data['agentName'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['visitorId'] === null) {
$invalidProperties[] = "'visitorId' can't be null";
}
if ($this->container['text'] === null) {
$invalidProperties[] = "'text' 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 visitorId
*
* @return string
*/
public function getVisitorId()
{
return $this->container['visitorId'];
}
/**
* Sets visitorId
*
* @param string $visitorId visitor’s ID received <a href=\"https://developers.sendinblue.com/docs/conversations-webhooks\">from a webhook</a> or generated by you to <a href=\"https://developers.sendinblue.com/docs/customize-the-widget#identifying-existing-users\">bind existing user account to Conversations</a>
*
* @return $this
*/
public function setVisitorId($visitorId)
{
$this->container['visitorId'] = $visitorId;
return $this;
}
/**
* Gets text
*
* @return string
*/
public function getText()
{
return $this->container['text'];
}
/**
* Sets text
*
* @param string $text message text
*
* @return $this
*/
public function setText($text)
{
$this->container['text'] = $text;
return $this;
}
/**
* Gets agentId
*
* @return string
*/
public function getAgentId()
{
return $this->container['agentId'];
}
/**
* Sets agentId
*
* @param string $agentId agent ID. It can be found on agent’s page or received <a href=\"https://developers.sendinblue.com/docs/conversations-webhooks\">from a webhook</a>. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required).
*
* @return $this
*/
public function setAgentId($agentId)
{
$this->container['agentId'] = $agentId;
return $this;
}
/**
* Gets receivedFrom
*
* @return string
*/
public function getReceivedFrom()
{
return $this->container['receivedFrom'];
}
/**
* Sets receivedFrom
*
* @param string $receivedFrom mark your messages to distinguish messages created by you from the others.
*
* @return $this
*/
public function setReceivedFrom($receivedFrom)
{
$this->container['receivedFrom'] = $receivedFrom;
return $this;
}
/**
* Gets agentEmail
*
* @return string
*/
public function getAgentEmail()
{
return $this->container['agentEmail'];
}
/**
* Sets agentEmail
*
* @param string $agentEmail agent email. When sending messages from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address.
*
* @return $this
*/
public function setAgentEmail($agentEmail)
{
$this->container['agentEmail'] = $agentEmail;
return $this;
}
/**
* Gets agentName
*
* @return string
*/
public function getAgentName()
{
return $this->container['agentName'];
}
/**
* Sets agentName
*
* @param string $agentName agent name
*
* @return $this
*/
public function setAgentName($agentName)
{
$this->container['agentName'] = $agentName;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,261 @@
<?php
/**
* Body9
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* Body9 Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class Body9 implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'body_9';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['text' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['text' => 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'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['text' => 'setText'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['text' => 'getText'];
/**
* 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;
}
/**
* 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";
}
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 edited message text
*
* @return $this
*/
public function setText($text)
{
$this->container['text'] = $text;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,236 @@
<?php
/**
* BodyVariablesItems
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* BodyVariablesItems Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class BodyVariablesItems implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'bodyVariablesItems';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [];
/**
* 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 = [];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [];
/**
* 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)
{
}
/**
* 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;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,259 @@
<?php
/**
* CompaniesList
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CompaniesList Class Doc Comment
*
* @category Class
* @description List of companies
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CompaniesList implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'CompaniesList';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['items' => '\\SendinBlue\\Client\\Model\\Company[]'];
/**
* 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\Company[]
*/
public function getItems()
{
return $this->container['items'];
}
/**
* Sets items
*
* @param \SendinBlue\Client\Model\Company[] $items List of compaies
*
* @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
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,325 @@
<?php
/**
* Company
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* Company Class Doc Comment
*
* @category Class
* @description Company Details
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class Company implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'Company';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['id' => 'string', 'attributes' => 'object', 'linkedContactsIds' => 'int[]', 'linkedDealsIds' => 'string[]'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['id' => null, 'attributes' => null, 'linkedContactsIds' => null, 'linkedDealsIds' => 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', 'attributes' => 'attributes', 'linkedContactsIds' => 'linkedContactsIds', 'linkedDealsIds' => 'linkedDealsIds'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['id' => 'setId', 'attributes' => 'setAttributes', 'linkedContactsIds' => 'setLinkedContactsIds', 'linkedDealsIds' => 'setLinkedDealsIds'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['id' => 'getId', 'attributes' => 'getAttributes', 'linkedContactsIds' => 'getLinkedContactsIds', 'linkedDealsIds' => 'getLinkedDealsIds'];
/**
* 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['attributes'] = isset($data['attributes']) ? $data['attributes'] : null;
$this->container['linkedContactsIds'] = isset($data['linkedContactsIds']) ? $data['linkedContactsIds'] : null;
$this->container['linkedDealsIds'] = isset($data['linkedDealsIds']) ? $data['linkedDealsIds'] : 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 company id
*
* @return $this
*/
public function setId($id)
{
$this->container['id'] = $id;
return $this;
}
/**
* Gets attributes
*
* @return object
*/
public function getAttributes()
{
return $this->container['attributes'];
}
/**
* Sets attributes
*
* @param object $attributes Company attributes with values
*
* @return $this
*/
public function setAttributes($attributes)
{
$this->container['attributes'] = $attributes;
return $this;
}
/**
* Gets linkedContactsIds
*
* @return int[]
*/
public function getLinkedContactsIds()
{
return $this->container['linkedContactsIds'];
}
/**
* Sets linkedContactsIds
*
* @param int[] $linkedContactsIds Contact ids for contacts linked to this company
*
* @return $this
*/
public function setLinkedContactsIds($linkedContactsIds)
{
$this->container['linkedContactsIds'] = $linkedContactsIds;
return $this;
}
/**
* Gets linkedDealsIds
*
* @return string[]
*/
public function getLinkedDealsIds()
{
return $this->container['linkedDealsIds'];
}
/**
* Sets linkedDealsIds
*
* @param string[] $linkedDealsIds Deals ids for companies linked to this company
*
* @return $this
*/
public function setLinkedDealsIds($linkedDealsIds)
{
$this->container['linkedDealsIds'] = $linkedDealsIds;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,347 @@
<?php
/**
* CompanyAttributesInner
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CompanyAttributesInner Class Doc Comment
*
* @category Class
* @description List of attributes
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CompanyAttributesInner implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'CompanyAttributes_inner';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['internalName' => 'string', 'label' => 'string', 'attributeTypeName' => 'string', 'attributeOptions' => 'object[]', 'isRequired' => 'bool'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['internalName' => null, 'label' => null, 'attributeTypeName' => null, 'attributeOptions' => null, 'isRequired' => 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 = ['internalName' => 'internalName', 'label' => 'label', 'attributeTypeName' => 'attributeTypeName', 'attributeOptions' => 'attributeOptions', 'isRequired' => 'isRequired'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['internalName' => 'setInternalName', 'label' => 'setLabel', 'attributeTypeName' => 'setAttributeTypeName', 'attributeOptions' => 'setAttributeOptions', 'isRequired' => 'setIsRequired'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['internalName' => 'getInternalName', 'label' => 'getLabel', 'attributeTypeName' => 'getAttributeTypeName', 'attributeOptions' => 'getAttributeOptions', 'isRequired' => 'getIsRequired'];
/**
* 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['internalName'] = isset($data['internalName']) ? $data['internalName'] : null;
$this->container['label'] = isset($data['label']) ? $data['label'] : null;
$this->container['attributeTypeName'] = isset($data['attributeTypeName']) ? $data['attributeTypeName'] : null;
$this->container['attributeOptions'] = isset($data['attributeOptions']) ? $data['attributeOptions'] : null;
$this->container['isRequired'] = isset($data['isRequired']) ? $data['isRequired'] : 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 internalName
*
* @return string
*/
public function getInternalName()
{
return $this->container['internalName'];
}
/**
* Sets internalName
*
* @param string $internalName internalName
*
* @return $this
*/
public function setInternalName($internalName)
{
$this->container['internalName'] = $internalName;
return $this;
}
/**
* Gets label
*
* @return string
*/
public function getLabel()
{
return $this->container['label'];
}
/**
* Sets label
*
* @param string $label label
*
* @return $this
*/
public function setLabel($label)
{
$this->container['label'] = $label;
return $this;
}
/**
* Gets attributeTypeName
*
* @return string
*/
public function getAttributeTypeName()
{
return $this->container['attributeTypeName'];
}
/**
* Sets attributeTypeName
*
* @param string $attributeTypeName attributeTypeName
*
* @return $this
*/
public function setAttributeTypeName($attributeTypeName)
{
$this->container['attributeTypeName'] = $attributeTypeName;
return $this;
}
/**
* Gets attributeOptions
*
* @return object[]
*/
public function getAttributeOptions()
{
return $this->container['attributeOptions'];
}
/**
* Sets attributeOptions
*
* @param object[] $attributeOptions attributeOptions
*
* @return $this
*/
public function setAttributeOptions($attributeOptions)
{
$this->container['attributeOptions'] = $attributeOptions;
return $this;
}
/**
* Gets isRequired
*
* @return bool
*/
public function getIsRequired()
{
return $this->container['isRequired'];
}
/**
* Sets isRequired
*
* @param bool $isRequired isRequired
*
* @return $this
*/
public function setIsRequired($isRequired)
{
$this->container['isRequired'] = $isRequired;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,280 @@
<?php
/**
* ComponentItems
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* ComponentItems Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class ComponentItems implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'componentItems';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['type' => 'string', 'text' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['type' => null, 'text' => 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 = ['type' => 'type', 'text' => 'text'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['type' => 'setType', 'text' => 'setText'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['type' => 'getType', 'text' => 'getText'];
/**
* 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['type'] = isset($data['type']) ? $data['type'] : null;
$this->container['text'] = isset($data['text']) ? $data['text'] : 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 type
*
* @return string
*/
public function getType()
{
return $this->container['type'];
}
/**
* Sets type
*
* @param string $type type
*
* @return $this
*/
public function setType($type)
{
$this->container['type'] = $type;
return $this;
}
/**
* Gets text
*
* @return string
*/
public function getText()
{
return $this->container['text'];
}
/**
* Sets text
*
* @param string $text text
*
* @return $this
*/
public function setText($text)
{
$this->container['text'] = $text;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,415 @@
<?php
/**
* Contact
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.12
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* Contact Class Doc Comment
*
* @category Class
* @description Contact Details
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class Contact implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'Contact';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['virtualNextTask' => '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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,482 @@
<?php
/**
* ConversationsMessage
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* ConversationsMessage Class Doc Comment
*
* @category Class
* @description a Conversations message
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class ConversationsMessage implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'ConversationsMessage';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['id' => 'string', 'type' => 'string', 'text' => 'string', 'visitorId' => 'string', 'agentId' => 'string', 'agentName' => 'string', 'createdAt' => 'int', 'isPushed' => 'bool', 'receivedFrom' => 'string', 'file' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\ConversationsMessageFile'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['id' => null, 'type' => null, 'text' => null, 'visitorId' => null, 'agentId' => null, 'agentName' => null, 'createdAt' => 'int64', 'isPushed' => null, 'receivedFrom' => null, 'file' => 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', 'type' => 'type', 'text' => 'text', 'visitorId' => 'visitorId', 'agentId' => 'agentId', 'agentName' => 'agentName', 'createdAt' => 'createdAt', 'isPushed' => 'isPushed', 'receivedFrom' => 'receivedFrom', 'file' => 'file'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['id' => 'setId', 'type' => 'setType', 'text' => 'setText', 'visitorId' => 'setVisitorId', 'agentId' => 'setAgentId', 'agentName' => 'setAgentName', 'createdAt' => 'setCreatedAt', 'isPushed' => 'setIsPushed', 'receivedFrom' => 'setReceivedFrom', 'file' => 'setFile'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['id' => 'getId', 'type' => 'getType', 'text' => 'getText', 'visitorId' => 'getVisitorId', 'agentId' => 'getAgentId', 'agentName' => 'getAgentName', 'createdAt' => 'getCreatedAt', 'isPushed' => 'getIsPushed', 'receivedFrom' => 'getReceivedFrom', 'file' => 'getFile'];
/**
* 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_AGENT = 'agent';
const TYPE_VISITOR = 'visitor';
/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getTypeAllowableValues()
{
return [self::TYPE_AGENT, self::TYPE_VISITOR];
}
/**
* 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['type'] = isset($data['type']) ? $data['type'] : null;
$this->container['text'] = isset($data['text']) ? $data['text'] : null;
$this->container['visitorId'] = isset($data['visitorId']) ? $data['visitorId'] : null;
$this->container['agentId'] = isset($data['agentId']) ? $data['agentId'] : null;
$this->container['agentName'] = isset($data['agentName']) ? $data['agentName'] : null;
$this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null;
$this->container['isPushed'] = isset($data['isPushed']) ? $data['isPushed'] : null;
$this->container['receivedFrom'] = isset($data['receivedFrom']) ? $data['receivedFrom'] : null;
$this->container['file'] = isset($data['file']) ? $data['file'] : 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));
}
if (!\is_null($this->container['createdAt']) && $this->container['createdAt'] < 0) {
$invalidProperties[] = "invalid value for 'createdAt', must be bigger than or equal to 0.";
}
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 Message ID. It can be used for further manipulations with the message.
*
* @return $this
*/
public function setId($id)
{
$this->container['id'] = $id;
return $this;
}
/**
* Gets type
*
* @return string
*/
public function getType()
{
return $this->container['type'];
}
/**
* Sets type
*
* @param string $type `\"agent\"` for agents’ messages, `\"visitor\"` for visitors’ messages.
*
* @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;
}
/**
* Gets text
*
* @return string
*/
public function getText()
{
return $this->container['text'];
}
/**
* Sets text
*
* @param string $text Message text or name of the attached file
*
* @return $this
*/
public function setText($text)
{
$this->container['text'] = $text;
return $this;
}
/**
* Gets visitorId
*
* @return string
*/
public function getVisitorId()
{
return $this->container['visitorId'];
}
/**
* Sets visitorId
*
* @param string $visitorId visitor’s ID
*
* @return $this
*/
public function setVisitorId($visitorId)
{
$this->container['visitorId'] = $visitorId;
return $this;
}
/**
* Gets agentId
*
* @return string
*/
public function getAgentId()
{
return $this->container['agentId'];
}
/**
* Sets agentId
*
* @param string $agentId ID of the agent on whose behalf the message was sent (only in messages sent by an agent).
*
* @return $this
*/
public function setAgentId($agentId)
{
$this->container['agentId'] = $agentId;
return $this;
}
/**
* Gets agentName
*
* @return string
*/
public function getAgentName()
{
return $this->container['agentName'];
}
/**
* Sets agentName
*
* @param string $agentName Agent’s name as displayed to the visitor. Only in the messages sent by an agent.
*
* @return $this
*/
public function setAgentName($agentName)
{
$this->container['agentName'] = $agentName;
return $this;
}
/**
* Gets createdAt
*
* @return int
*/
public function getCreatedAt()
{
return $this->container['createdAt'];
}
/**
* Sets createdAt
*
* @param int $createdAt Timestamp in milliseconds.
*
* @return $this
*/
public function setCreatedAt($createdAt)
{
if (!\is_null($createdAt) && $createdAt < 0) {
throw new \InvalidArgumentException('invalid value for $createdAt when calling ConversationsMessage., must be bigger than or equal to 0.');
}
$this->container['createdAt'] = $createdAt;
return $this;
}
/**
* Gets isPushed
*
* @return bool
*/
public function getIsPushed()
{
return $this->container['isPushed'];
}
/**
* Sets isPushed
*
* @param bool $isPushed `true` for pushed messages
*
* @return $this
*/
public function setIsPushed($isPushed)
{
$this->container['isPushed'] = $isPushed;
return $this;
}
/**
* Gets receivedFrom
*
* @return string
*/
public function getReceivedFrom()
{
return $this->container['receivedFrom'];
}
/**
* Sets receivedFrom
*
* @param string $receivedFrom In two-way integrations, messages sent via REST API can be marked with receivedFrom property and then filtered out when received in a webhook to avoid infinite loop.
*
* @return $this
*/
public function setReceivedFrom($receivedFrom)
{
$this->container['receivedFrom'] = $receivedFrom;
return $this;
}
/**
* Gets file
*
* @return \SendinBlue\Client\Model\ConversationsMessageFile
*/
public function getFile()
{
return $this->container['file'];
}
/**
* Sets file
*
* @param \SendinBlue\Client\Model\ConversationsMessageFile $file file
*
* @return $this
*/
public function setFile($file)
{
$this->container['file'] = $file;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,352 @@
<?php
/**
* ConversationsMessageFile
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* ConversationsMessageFile Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class ConversationsMessageFile implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'ConversationsMessage_file';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['filename' => 'string', 'size' => 'int', 'isImage' => 'bool', 'url' => 'string', 'imageInfo' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\ConversationsMessageFileImageInfo'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['filename' => null, 'size' => 'int64', 'isImage' => null, 'url' => 'url', 'imageInfo' => 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 = ['filename' => 'filename', 'size' => 'size', 'isImage' => 'isImage', 'url' => 'url', 'imageInfo' => 'imageInfo'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['filename' => 'setFilename', 'size' => 'setSize', 'isImage' => 'setIsImage', 'url' => 'setUrl', 'imageInfo' => 'setImageInfo'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['filename' => 'getFilename', 'size' => 'getSize', 'isImage' => 'getIsImage', 'url' => 'getUrl', 'imageInfo' => 'getImageInfo'];
/**
* 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['filename'] = isset($data['filename']) ? $data['filename'] : null;
$this->container['size'] = isset($data['size']) ? $data['size'] : null;
$this->container['isImage'] = isset($data['isImage']) ? $data['isImage'] : null;
$this->container['url'] = isset($data['url']) ? $data['url'] : null;
$this->container['imageInfo'] = isset($data['imageInfo']) ? $data['imageInfo'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if (!\is_null($this->container['size']) && $this->container['size'] < 0) {
$invalidProperties[] = "invalid value for 'size', must be bigger than or equal to 0.";
}
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 filename
*
* @return string
*/
public function getFilename()
{
return $this->container['filename'];
}
/**
* Sets filename
*
* @param string $filename Name of the file
*
* @return $this
*/
public function setFilename($filename)
{
$this->container['filename'] = $filename;
return $this;
}
/**
* Gets size
*
* @return int
*/
public function getSize()
{
return $this->container['size'];
}
/**
* Sets size
*
* @param int $size Size in bytes
*
* @return $this
*/
public function setSize($size)
{
if (!\is_null($size) && $size < 0) {
throw new \InvalidArgumentException('invalid value for $size when calling ConversationsMessageFile., must be bigger than or equal to 0.');
}
$this->container['size'] = $size;
return $this;
}
/**
* Gets isImage
*
* @return bool
*/
public function getIsImage()
{
return $this->container['isImage'];
}
/**
* Sets isImage
*
* @param bool $isImage Whether the file is an image
*
* @return $this
*/
public function setIsImage($isImage)
{
$this->container['isImage'] = $isImage;
return $this;
}
/**
* Gets url
*
* @return string
*/
public function getUrl()
{
return $this->container['url'];
}
/**
* Sets url
*
* @param string $url URL of the file
*
* @return $this
*/
public function setUrl($url)
{
$this->container['url'] = $url;
return $this;
}
/**
* Gets imageInfo
*
* @return \SendinBlue\Client\Model\ConversationsMessageFileImageInfo
*/
public function getImageInfo()
{
return $this->container['imageInfo'];
}
/**
* Sets imageInfo
*
* @param \SendinBlue\Client\Model\ConversationsMessageFileImageInfo $imageInfo imageInfo
*
* @return $this
*/
public function setImageInfo($imageInfo)
{
$this->container['imageInfo'] = $imageInfo;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,315 @@
<?php
/**
* ConversationsMessageFileImageInfo
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* ConversationsMessageFileImageInfo Class Doc Comment
*
* @category Class
* @description image info is passed in case the file is an image
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class ConversationsMessageFileImageInfo implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'ConversationsMessage_file_imageInfo';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['width' => 'int', 'height' => 'int', 'previewUrl' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['width' => 'int64', 'height' => 'int64', 'previewUrl' => 'url'];
/**
* 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 = ['width' => 'width', 'height' => 'height', 'previewUrl' => 'previewUrl'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['width' => 'setWidth', 'height' => 'setHeight', 'previewUrl' => 'setPreviewUrl'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['width' => 'getWidth', 'height' => 'getHeight', 'previewUrl' => 'getPreviewUrl'];
/**
* 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['width'] = isset($data['width']) ? $data['width'] : null;
$this->container['height'] = isset($data['height']) ? $data['height'] : null;
$this->container['previewUrl'] = isset($data['previewUrl']) ? $data['previewUrl'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if (!\is_null($this->container['width']) && $this->container['width'] < 0) {
$invalidProperties[] = "invalid value for 'width', must be bigger than or equal to 0.";
}
if (!\is_null($this->container['height']) && $this->container['height'] < 0) {
$invalidProperties[] = "invalid value for 'height', must be bigger than or equal to 0.";
}
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 width
*
* @return int
*/
public function getWidth()
{
return $this->container['width'];
}
/**
* Sets width
*
* @param int $width Width of the image
*
* @return $this
*/
public function setWidth($width)
{
if (!\is_null($width) && $width < 0) {
throw new \InvalidArgumentException('invalid value for $width when calling ConversationsMessageFileImageInfo., must be bigger than or equal to 0.');
}
$this->container['width'] = $width;
return $this;
}
/**
* Gets height
*
* @return int
*/
public function getHeight()
{
return $this->container['height'];
}
/**
* Sets height
*
* @param int $height height of the image
*
* @return $this
*/
public function setHeight($height)
{
if (!\is_null($height) && $height < 0) {
throw new \InvalidArgumentException('invalid value for $height when calling ConversationsMessageFileImageInfo., must be bigger than or equal to 0.');
}
$this->container['height'] = $height;
return $this;
}
/**
* Gets previewUrl
*
* @return string
*/
public function getPreviewUrl()
{
return $this->container['previewUrl'];
}
/**
* Sets previewUrl
*
* @param string $previewUrl URL of the preview
*
* @return $this
*/
public function setPreviewUrl($previewUrl)
{
$this->container['previewUrl'] = $previewUrl;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,283 @@
<?php
/**
* CreateApiKeyRequest
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreateApiKeyRequest Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateApiKeyRequest implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createApiKeyRequest';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['id' => 'int', 'name' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['id' => 'int64', '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 = ['id' => 'id', 'name' => 'name'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['id' => 'setId', 'name' => 'setName'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['id' => 'getId', '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['id'] = isset($data['id']) ? $data['id'] : 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['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 name
*
* @return string
*/
public function getName()
{
return $this->container['name'];
}
/**
* Sets name
*
* @param string $name Name of the API key
*
* @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
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,280 @@
<?php
/**
* CreateApiKeyResponse
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreateApiKeyResponse Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateApiKeyResponse implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createApiKeyResponse';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['status' => 'string', 'key' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['status' => null, 'key' => 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 = ['status' => 'status', 'key' => 'key'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['status' => 'setStatus', 'key' => 'setKey'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['status' => 'getStatus', 'key' => 'getKey'];
/**
* 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['status'] = isset($data['status']) ? $data['status'] : null;
$this->container['key'] = isset($data['key']) ? $data['key'] : 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 status
*
* @return string
*/
public function getStatus()
{
return $this->container['status'];
}
/**
* Sets status
*
* @param string $status Status of the API operation.
*
* @return $this
*/
public function setStatus($status)
{
$this->container['status'] = $status;
return $this;
}
/**
* Gets key
*
* @return string
*/
public function getKey()
{
return $this->container['key'];
}
/**
* Sets key
*
* @param string $key API Key
*
* @return $this
*/
public function setKey($key)
{
$this->container['key'] = $key;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,347 @@
<?php
/**
* CreateAttribute
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreateAttribute Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateAttribute implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createAttribute';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['value' => 'string', 'isRecurring' => 'bool', 'enumeration' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\CreateAttributeEnumeration[]', 'type' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['value' => null, 'isRecurring' => null, 'enumeration' => null, '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 = ['value' => 'value', 'isRecurring' => 'isRecurring', 'enumeration' => 'enumeration', 'type' => 'type'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['value' => 'setValue', 'isRecurring' => 'setIsRecurring', 'enumeration' => 'setEnumeration', 'type' => 'setType'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['value' => 'getValue', 'isRecurring' => 'getIsRecurring', 'enumeration' => 'getEnumeration', '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_TEXT = 'text';
const TYPE_DATE = 'date';
const TYPE_FLOAT = 'float';
const TYPE_BOOLEAN = 'boolean';
const TYPE_ID = 'id';
const TYPE_CATEGORY = 'category';
/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getTypeAllowableValues()
{
return [self::TYPE_TEXT, self::TYPE_DATE, self::TYPE_FLOAT, self::TYPE_BOOLEAN, self::TYPE_ID, self::TYPE_CATEGORY];
}
/**
* 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['isRecurring'] = isset($data['isRecurring']) ? $data['isRecurring'] : null;
$this->container['enumeration'] = isset($data['enumeration']) ? $data['enumeration'] : 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 value
*
* @return string
*/
public function getValue()
{
return $this->container['value'];
}
/**
* Sets value
*
* @param string $value Value of the attribute. Use only if the attribute's category is 'calculated' or 'global'
*
* @return $this
*/
public function setValue($value)
{
$this->container['value'] = $value;
return $this;
}
/**
* Gets isRecurring
*
* @return bool
*/
public function getIsRecurring()
{
return $this->container['isRecurring'];
}
/**
* Sets isRecurring
*
* @param bool $isRecurring Type of the attribute. Use only if the attribute's category is 'calculated' or 'global'
*
* @return $this
*/
public function setIsRecurring($isRecurring)
{
$this->container['isRecurring'] = $isRecurring;
return $this;
}
/**
* Gets enumeration
*
* @return \SendinBlue\Client\Model\CreateAttributeEnumeration[]
*/
public function getEnumeration()
{
return $this->container['enumeration'];
}
/**
* Sets enumeration
*
* @param \SendinBlue\Client\Model\CreateAttributeEnumeration[] $enumeration List of values and labels that the attribute can take. Use only if the attribute's category is \"category\". For example, [{\"value\":1, \"label\":\"male\"}, {\"value\":2, \"label\":\"female\"}]
*
* @return $this
*/
public function setEnumeration($enumeration)
{
$this->container['enumeration'] = $enumeration;
return $this;
}
/**
* Gets type
*
* @return string
*/
public function getType()
{
return $this->container['type'];
}
/**
* Sets type
*
* @param string $type Type of the attribute. Use only if the attribute's category is 'normal', 'category' or 'transactional' ( type 'boolean' is only available if the category is 'normal' attribute, type 'id' is only available if the category is 'transactional' attribute & type 'category' is only available if the category is 'category' attribute )
*
* @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
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,286 @@
<?php
/**
* CreateAttributeEnumeration
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreateAttributeEnumeration Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateAttributeEnumeration implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createAttribute_enumeration';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['value' => 'int', 'label' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['value' => null, 'label' => 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', 'label' => 'label'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['value' => 'setValue', 'label' => 'setLabel'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['value' => 'getValue', 'label' => 'getLabel'];
/**
* 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['value'] = isset($data['value']) ? $data['value'] : null;
$this->container['label'] = isset($data['label']) ? $data['label'] : 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['label'] === null) {
$invalidProperties[] = "'label' 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 Id of the value
*
* @return $this
*/
public function setValue($value)
{
$this->container['value'] = $value;
return $this;
}
/**
* Gets label
*
* @return string
*/
public function getLabel()
{
return $this->container['label'];
}
/**
* Sets label
*
* @param string $label Label of the value
*
* @return $this
*/
public function setLabel($label)
{
$this->container['label'] = $label;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,258 @@
<?php
/**
* CreateCategoryModel
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreateCategoryModel Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateCategoryModel implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createCategoryModel';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['id' => '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 = [];
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 category when a new category is 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
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,406 @@
<?php
/**
* CreateChild
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreateChild Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateChild implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createChild';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['email' => 'string', 'firstName' => 'string', 'lastName' => 'string', 'companyName' => 'string', 'password' => 'string', 'language' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['email' => 'email', 'firstName' => null, 'lastName' => null, 'companyName' => null, 'password' => 'password', 'language' => 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', 'firstName' => 'firstName', 'lastName' => 'lastName', 'companyName' => 'companyName', 'password' => 'password', 'language' => 'language'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['email' => 'setEmail', 'firstName' => 'setFirstName', 'lastName' => 'setLastName', 'companyName' => 'setCompanyName', 'password' => 'setPassword', 'language' => 'setLanguage'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['email' => 'getEmail', 'firstName' => 'getFirstName', 'lastName' => 'getLastName', 'companyName' => 'getCompanyName', 'password' => 'getPassword', 'language' => 'getLanguage'];
/**
* 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_FR = 'fr';
const LANGUAGE_ES = 'es';
const LANGUAGE_PT = 'pt';
const LANGUAGE_IT = 'it';
const LANGUAGE_DE = 'de';
const LANGUAGE_EN = 'en';
/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getLanguageAllowableValues()
{
return [self::LANGUAGE_FR, self::LANGUAGE_ES, self::LANGUAGE_PT, self::LANGUAGE_IT, self::LANGUAGE_DE, self::LANGUAGE_EN];
}
/**
* 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['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['password'] = isset($data['password']) ? $data['password'] : null;
$this->container['language'] = isset($data['language']) ? $data['language'] : 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['firstName'] === null) {
$invalidProperties[] = "'firstName' can't be null";
}
if ($this->container['lastName'] === null) {
$invalidProperties[] = "'lastName' can't be null";
}
if ($this->container['companyName'] === null) {
$invalidProperties[] = "'companyName' can't be null";
}
if ($this->container['password'] === null) {
$invalidProperties[] = "'password' 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 email
*
* @return string
*/
public function getEmail()
{
return $this->container['email'];
}
/**
* Sets email
*
* @param string $email Email address to create the child account
*
* @return $this
*/
public function setEmail($email)
{
$this->container['email'] = $email;
return $this;
}
/**
* Gets firstName
*
* @return string
*/
public function getFirstName()
{
return $this->container['firstName'];
}
/**
* Sets firstName
*
* @param string $firstName First name to use to create the child account
*
* @return $this
*/
public function setFirstName($firstName)
{
$this->container['firstName'] = $firstName;
return $this;
}
/**
* Gets lastName
*
* @return string
*/
public function getLastName()
{
return $this->container['lastName'];
}
/**
* Sets lastName
*
* @param string $lastName Last name to use to create the child account
*
* @return $this
*/
public function setLastName($lastName)
{
$this->container['lastName'] = $lastName;
return $this;
}
/**
* Gets companyName
*
* @return string
*/
public function getCompanyName()
{
return $this->container['companyName'];
}
/**
* Sets companyName
*
* @param string $companyName Company name to use to create the child account
*
* @return $this
*/
public function setCompanyName($companyName)
{
$this->container['companyName'] = $companyName;
return $this;
}
/**
* Gets password
*
* @return string
*/
public function getPassword()
{
return $this->container['password'];
}
/**
* Sets password
*
* @param string $password Password for the child account to login
*
* @return $this
*/
public function setPassword($password)
{
$this->container['password'] = $password;
return $this;
}
/**
* Gets language
*
* @return string
*/
public function getLanguage()
{
return $this->container['language'];
}
/**
* Sets language
*
* @param string $language Language of the child 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;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,390 @@
<?php
/**
* CreateContact
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreateContact Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateContact implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createContact';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['email' => 'string', 'attributes' => 'object', 'emailBlacklisted' => 'bool', 'smsBlacklisted' => 'bool', 'listIds' => 'int[]', 'updateEnabled' => 'bool', 'smtpBlacklistSender' => 'string[]'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['email' => 'email', 'attributes' => null, 'emailBlacklisted' => null, 'smsBlacklisted' => null, 'listIds' => 'int64', 'updateEnabled' => null, 'smtpBlacklistSender' => '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 = ['email' => 'email', 'attributes' => 'attributes', 'emailBlacklisted' => 'emailBlacklisted', 'smsBlacklisted' => 'smsBlacklisted', 'listIds' => 'listIds', 'updateEnabled' => 'updateEnabled', 'smtpBlacklistSender' => 'smtpBlacklistSender'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['email' => 'setEmail', 'attributes' => 'setAttributes', 'emailBlacklisted' => 'setEmailBlacklisted', 'smsBlacklisted' => 'setSmsBlacklisted', 'listIds' => 'setListIds', 'updateEnabled' => 'setUpdateEnabled', 'smtpBlacklistSender' => 'setSmtpBlacklistSender'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['email' => 'getEmail', 'attributes' => 'getAttributes', 'emailBlacklisted' => 'getEmailBlacklisted', 'smsBlacklisted' => 'getSmsBlacklisted', 'listIds' => 'getListIds', 'updateEnabled' => 'getUpdateEnabled', 'smtpBlacklistSender' => 'getSmtpBlacklistSender'];
/**
* 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['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;
}
/**
* 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 address of the user. Mandatory if \"SMS\" field is not passed in \"attributes\" parameter. Mobile Number in \"SMS\" field should be passed with proper country code. For example {\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"}
*
* @return $this
*/
public function setEmail($email)
{
$this->container['email'] = $email;
return $this;
}
/**
* Gets attributes
*
* @return object
*/
public function getAttributes()
{
return $this->container['attributes'];
}
/**
* 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\"}
*
* @return $this
*/
public function setAttributes($attributes)
{
$this->container['attributes'] = $attributes;
return $this;
}
/**
* Gets emailBlacklisted
*
* @return bool
*/
public function getEmailBlacklisted()
{
return $this->container['emailBlacklisted'];
}
/**
* Sets emailBlacklisted
*
* @param bool $emailBlacklisted Set this field to blacklist the contact for emails (emailBlacklisted = true)
*
* @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 Set this field to blacklist the contact for SMS (smsBlacklisted = true)
*
* @return $this
*/
public function setSmsBlacklisted($smsBlacklisted)
{
$this->container['smsBlacklisted'] = $smsBlacklisted;
return $this;
}
/**
* Gets listIds
*
* @return int[]
*/
public function getListIds()
{
return $this->container['listIds'];
}
/**
* Sets listIds
*
* @param int[] $listIds Ids of the lists to add the contact to
*
* @return $this
*/
public function setListIds($listIds)
{
$this->container['listIds'] = $listIds;
return $this;
}
/**
* Gets updateEnabled
*
* @return bool
*/
public function getUpdateEnabled()
{
return $this->container['updateEnabled'];
}
/**
* Sets updateEnabled
*
* @param bool $updateEnabled Facilitate to update the existing contact in the same request (updateEnabled = true)
*
* @return $this
*/
public function setUpdateEnabled($updateEnabled)
{
$this->container['updateEnabled'] = $updateEnabled;
return $this;
}
/**
* Gets smtpBlacklistSender
*
* @return string[]
*/
public function getSmtpBlacklistSender()
{
return $this->container['smtpBlacklistSender'];
}
/**
* Sets smtpBlacklistSender
*
* @param string[] $smtpBlacklistSender transactional email forbidden sender for contact. Use only for email Contact ( only available if updateEnabled = true )
*
* @return $this
*/
public function setSmtpBlacklistSender($smtpBlacklistSender)
{
$this->container['smtpBlacklistSender'] = $smtpBlacklistSender;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,380 @@
<?php
/**
* CreateDoiContact
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreateDoiContact Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateDoiContact implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createDoiContact';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['email' => 'string', 'attributes' => 'object', 'includeListIds' => 'int[]', 'excludeListIds' => 'int[]', 'templateId' => 'int', 'redirectionUrl' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['email' => 'email', 'attributes' => null, 'includeListIds' => 'int64', 'excludeListIds' => 'int64', 'templateId' => 'int64', 'redirectionUrl' => 'url'];
/**
* 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', 'attributes' => 'attributes', 'includeListIds' => 'includeListIds', 'excludeListIds' => 'excludeListIds', 'templateId' => 'templateId', 'redirectionUrl' => 'redirectionUrl'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['email' => 'setEmail', 'attributes' => 'setAttributes', 'includeListIds' => 'setIncludeListIds', 'excludeListIds' => 'setExcludeListIds', 'templateId' => 'setTemplateId', 'redirectionUrl' => 'setRedirectionUrl'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['email' => 'getEmail', 'attributes' => 'getAttributes', 'includeListIds' => 'getIncludeListIds', 'excludeListIds' => 'getExcludeListIds', 'templateId' => 'getTemplateId', 'redirectionUrl' => 'getRedirectionUrl'];
/**
* 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['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;
}
/**
* 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['includeListIds'] === null) {
$invalidProperties[] = "'includeListIds' can't be null";
}
if ($this->container['templateId'] === null) {
$invalidProperties[] = "'templateId' can't be null";
}
if ($this->container['redirectionUrl'] === null) {
$invalidProperties[] = "'redirectionUrl' 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 where the confirmation email will be sent. This email address will be the identifier for all other contact attributes.
*
* @return $this
*/
public function setEmail($email)
{
$this->container['email'] = $email;
return $this;
}
/**
* Gets attributes
*
* @return object
*/
public function getAttributes()
{
return $this->container['attributes'];
}
/**
* Sets attributes
*
* @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
*/
public function setAttributes($attributes)
{
$this->container['attributes'] = $attributes;
return $this;
}
/**
* Gets includeListIds
*
* @return int[]
*/
public function getIncludeListIds()
{
return $this->container['includeListIds'];
}
/**
* Sets includeListIds
*
* @param int[] $includeListIds Lists under user account where contact should be added
*
* @return $this
*/
public function setIncludeListIds($includeListIds)
{
$this->container['includeListIds'] = $includeListIds;
return $this;
}
/**
* Gets excludeListIds
*
* @return int[]
*/
public function getExcludeListIds()
{
return $this->container['excludeListIds'];
}
/**
* Sets excludeListIds
*
* @param int[] $excludeListIds Lists under user account where contact should not be added
*
* @return $this
*/
public function setExcludeListIds($excludeListIds)
{
$this->container['excludeListIds'] = $excludeListIds;
return $this;
}
/**
* Gets templateId
*
* @return int
*/
public function getTemplateId()
{
return $this->container['templateId'];
}
/**
* Sets templateId
*
* @param int $templateId Id of the Double opt-in (DOI) template
*
* @return $this
*/
public function setTemplateId($templateId)
{
$this->container['templateId'] = $templateId;
return $this;
}
/**
* Gets redirectionUrl
*
* @return string
*/
public function getRedirectionUrl()
{
return $this->container['redirectionUrl'];
}
/**
* Sets redirectionUrl
*
* @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 }}.
*
* @return $this
*/
public function setRedirectionUrl($redirectionUrl)
{
$this->container['redirectionUrl'] = $redirectionUrl;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,957 @@
<?php
/**
* CreateEmailCampaign
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreateEmailCampaign Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateEmailCampaign implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createEmailCampaign';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['tag' => 'string', 'sender' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\CreateEmailCampaignSender', 'name' => 'string', 'htmlContent' => 'string', 'htmlUrl' => 'string', 'templateId' => 'int', 'scheduledAt' => 'string', 'subject' => 'string', 'replyTo' => 'string', 'toField' => 'string', 'recipients' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\CreateEmailCampaignRecipients', 'attachmentUrl' => 'string', 'inlineImageActivation' => 'bool', 'mirrorActive' => 'bool', 'footer' => 'string', 'header' => 'string', 'utmCampaign' => 'string', 'params' => 'object', 'sendAtBestTime' => 'bool', 'abTesting' => 'bool', 'subjectA' => 'string', 'subjectB' => 'string', 'splitRule' => 'int', 'winnerCriteria' => 'string', 'winnerDelay' => 'int', 'ipWarmupEnable' => 'bool', 'initialQuota' => 'int', 'increaseRate' => 'int', 'unsubscriptionPageId' => 'string', 'updateFormId' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['tag' => null, 'sender' => null, 'name' => null, 'htmlContent' => null, 'htmlUrl' => 'url', 'templateId' => 'int64', 'scheduledAt' => null, 'subject' => null, 'replyTo' => 'email', 'toField' => null, 'recipients' => null, 'attachmentUrl' => 'url', 'inlineImageActivation' => null, 'mirrorActive' => null, 'footer' => null, 'header' => null, 'utmCampaign' => null, 'params' => null, 'sendAtBestTime' => null, 'abTesting' => null, 'subjectA' => null, 'subjectB' => null, 'splitRule' => 'int64', 'winnerCriteria' => null, 'winnerDelay' => 'int64', 'ipWarmupEnable' => null, 'initialQuota' => 'int64', 'increaseRate' => 'int64', 'unsubscriptionPageId' => null, 'updateFormId' => 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 = ['tag' => 'tag', 'sender' => 'sender', 'name' => 'name', 'htmlContent' => 'htmlContent', 'htmlUrl' => 'htmlUrl', 'templateId' => 'templateId', 'scheduledAt' => 'scheduledAt', 'subject' => 'subject', 'replyTo' => 'replyTo', 'toField' => 'toField', 'recipients' => 'recipients', 'attachmentUrl' => 'attachmentUrl', 'inlineImageActivation' => 'inlineImageActivation', 'mirrorActive' => 'mirrorActive', 'footer' => 'footer', 'header' => 'header', 'utmCampaign' => 'utmCampaign', 'params' => 'params', 'sendAtBestTime' => 'sendAtBestTime', 'abTesting' => 'abTesting', 'subjectA' => 'subjectA', 'subjectB' => 'subjectB', 'splitRule' => 'splitRule', 'winnerCriteria' => 'winnerCriteria', 'winnerDelay' => 'winnerDelay', 'ipWarmupEnable' => 'ipWarmupEnable', 'initialQuota' => 'initialQuota', 'increaseRate' => 'increaseRate', 'unsubscriptionPageId' => 'unsubscriptionPageId', 'updateFormId' => 'updateFormId'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['tag' => 'setTag', 'sender' => 'setSender', 'name' => 'setName', 'htmlContent' => 'setHtmlContent', 'htmlUrl' => 'setHtmlUrl', 'templateId' => 'setTemplateId', 'scheduledAt' => 'setScheduledAt', 'subject' => 'setSubject', 'replyTo' => 'setReplyTo', 'toField' => 'setToField', 'recipients' => 'setRecipients', 'attachmentUrl' => 'setAttachmentUrl', 'inlineImageActivation' => 'setInlineImageActivation', 'mirrorActive' => 'setMirrorActive', 'footer' => 'setFooter', 'header' => 'setHeader', 'utmCampaign' => 'setUtmCampaign', 'params' => 'setParams', 'sendAtBestTime' => 'setSendAtBestTime', 'abTesting' => 'setAbTesting', 'subjectA' => 'setSubjectA', 'subjectB' => 'setSubjectB', 'splitRule' => 'setSplitRule', 'winnerCriteria' => 'setWinnerCriteria', 'winnerDelay' => 'setWinnerDelay', 'ipWarmupEnable' => 'setIpWarmupEnable', 'initialQuota' => 'setInitialQuota', 'increaseRate' => 'setIncreaseRate', 'unsubscriptionPageId' => 'setUnsubscriptionPageId', 'updateFormId' => 'setUpdateFormId'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['tag' => 'getTag', 'sender' => 'getSender', 'name' => 'getName', 'htmlContent' => 'getHtmlContent', 'htmlUrl' => 'getHtmlUrl', 'templateId' => 'getTemplateId', 'scheduledAt' => 'getScheduledAt', 'subject' => 'getSubject', 'replyTo' => 'getReplyTo', 'toField' => 'getToField', 'recipients' => 'getRecipients', 'attachmentUrl' => 'getAttachmentUrl', 'inlineImageActivation' => 'getInlineImageActivation', 'mirrorActive' => 'getMirrorActive', 'footer' => 'getFooter', 'header' => 'getHeader', 'utmCampaign' => 'getUtmCampaign', 'params' => 'getParams', 'sendAtBestTime' => 'getSendAtBestTime', 'abTesting' => 'getAbTesting', 'subjectA' => 'getSubjectA', 'subjectB' => 'getSubjectB', 'splitRule' => 'getSplitRule', 'winnerCriteria' => 'getWinnerCriteria', 'winnerDelay' => 'getWinnerDelay', 'ipWarmupEnable' => 'getIpWarmupEnable', 'initialQuota' => 'getInitialQuota', 'increaseRate' => 'getIncreaseRate', 'unsubscriptionPageId' => 'getUnsubscriptionPageId', 'updateFormId' => 'getUpdateFormId'];
/**
* 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 WINNER_CRITERIA_OPEN = 'open';
const WINNER_CRITERIA_CLICK = 'click';
/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getWinnerCriteriaAllowableValues()
{
return [self::WINNER_CRITERIA_OPEN, self::WINNER_CRITERIA_CLICK];
}
/**
* 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['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['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['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['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['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['unsubscriptionPageId'] = isset($data['unsubscriptionPageId']) ? $data['unsubscriptionPageId'] : null;
$this->container['updateFormId'] = isset($data['updateFormId']) ? $data['updateFormId'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['sender'] === null) {
$invalidProperties[] = "'sender' can't be null";
}
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['splitRule']) && $this->container['splitRule'] < 1) {
$invalidProperties[] = "invalid value for 'splitRule', must be bigger than or equal to 1.";
}
$allowedValues = $this->getWinnerCriteriaAllowableValues();
if (!\is_null($this->container['winnerCriteria']) && !\in_array($this->container['winnerCriteria'], $allowedValues, \true)) {
$invalidProperties[] = \sprintf("invalid value for 'winnerCriteria', 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['winnerDelay']) && $this->container['winnerDelay'] < 1) {
$invalidProperties[] = "invalid value for 'winnerDelay', 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['increaseRate']) && $this->container['increaseRate'] < 0) {
$invalidProperties[] = "invalid value for 'increaseRate', must be bigger than or equal to 0.";
}
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 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 sender
*
* @return \SendinBlue\Client\Model\CreateEmailCampaignSender
*/
public function getSender()
{
return $this->container['sender'];
}
/**
* Sets sender
*
* @param \SendinBlue\Client\Model\CreateEmailCampaignSender $sender sender
*
* @return $this
*/
public function setSender($sender)
{
$this->container['sender'] = $sender;
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 htmlContent
*
* @return string
*/
public function getHtmlContent()
{
return $this->container['htmlContent'];
}
/**
* Sets htmlContent
*
* @param string $htmlContent Mandatory if htmlUrl and templateId are empty. Body of the message (HTML)
*
* @return $this
*/
public function setHtmlContent($htmlContent)
{
$this->container['htmlContent'] = $htmlContent;
return $this;
}
/**
* Gets htmlUrl
*
* @return string
*/
public function getHtmlUrl()
{
return $this->container['htmlUrl'];
}
/**
* Sets htmlUrl
*
* @param string $htmlUrl Mandatory if htmlContent and templateId are empty. Url to the message (HTML)
*
* @return $this
*/
public function setHtmlUrl($htmlUrl)
{
$this->container['htmlUrl'] = $htmlUrl;
return $this;
}
/**
* Gets templateId
*
* @return int
*/
public function getTemplateId()
{
return $this->container['templateId'];
}
/**
* Sets templateId
*
* @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.
*
* @return $this
*/
public function setTemplateId($templateId)
{
$this->container['templateId'] = $templateId;
return $this;
}
/**
* Gets scheduledAt
*
* @return string
*/
public function getScheduledAt()
{
return $this->container['scheduledAt'];
}
/**
* Sets scheduledAt
*
* @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).
*
* @return $this
*/
public function setScheduledAt($scheduledAt)
{
$this->container['scheduledAt'] = $scheduledAt;
return $this;
}
/**
* Gets subject
*
* @return string
*/
public function getSubject()
{
return $this->container['subject'];
}
/**
* Sets subject
*
* @param string $subject Subject of the campaign. Mandatory if abTesting is false. Ignored if abTesting is true.
*
* @return $this
*/
public function setSubject($subject)
{
$this->container['subject'] = $subject;
return $this;
}
/**
* Gets replyTo
*
* @return string
*/
public function getReplyTo()
{
return $this->container['replyTo'];
}
/**
* Sets replyTo
*
* @param string $replyTo Email on which the campaign recipients will be able to reply to
*
* @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 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)
{
$this->container['toField'] = $toField;
return $this;
}
/**
* Gets recipients
*
* @return \SendinBlue\Client\Model\CreateEmailCampaignRecipients
*/
public function getRecipients()
{
return $this->container['recipients'];
}
/**
* Sets recipients
*
* @param \SendinBlue\Client\Model\CreateEmailCampaignRecipients $recipients recipients
*
* @return $this
*/
public function setRecipients($recipients)
{
$this->container['recipients'] = $recipients;
return $this;
}
/**
* Gets attachmentUrl
*
* @return string
*/
public function getAttachmentUrl()
{
return $this->container['attachmentUrl'];
}
/**
* Sets attachmentUrl
*
* @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
*
* @return $this
*/
public function setAttachmentUrl($attachmentUrl)
{
$this->container['attachmentUrl'] = $attachmentUrl;
return $this;
}
/**
* Gets inlineImageActivation
*
* @return bool
*/
public function getInlineImageActivation()
{
return $this->container['inlineImageActivation'];
}
/**
* Sets inlineImageActivation
*
* @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
*
* @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 Use true to enable the mirror link
*
* @return $this
*/
public function setMirrorActive($mirrorActive)
{
$this->container['mirrorActive'] = $mirrorActive;
return $this;
}
/**
* Gets footer
*
* @return string
*/
public function getFooter()
{
return $this->container['footer'];
}
/**
* Sets footer
*
* @param string $footer Footer of the email campaign
*
* @return $this
*/
public function setFooter($footer)
{
$this->container['footer'] = $footer;
return $this;
}
/**
* Gets header
*
* @return string
*/
public function getHeader()
{
return $this->container['header'];
}
/**
* Sets header
*
* @param string $header Header of the email campaign
*
* @return $this
*/
public function setHeader($header)
{
$this->container['header'] = $header;
return $this;
}
/**
* Gets utmCampaign
*
* @return string
*/
public function getUtmCampaign()
{
return $this->container['utmCampaign'];
}
/**
* Sets utmCampaign
*
* @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
*
* @return $this
*/
public function setUtmCampaign($utmCampaign)
{
$this->container['utmCampaign'] = $utmCampaign;
return $this;
}
/**
* Gets params
*
* @return object
*/
public function getParams()
{
return $this->container['params'];
}
/**
* Sets params
*
* @param object $params Pass the set of attributes to customize the type classic campaign. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. Only available if 'type' is 'classic'. It's considered only if campaign is in New Template Language format. The New Template Language is dependent on the values of 'subject', 'htmlContent/htmlUrl', 'sender.name' & 'toField'
*
* @return $this
*/
public function setParams($params)
{
$this->container['params'] = $params;
return $this;
}
/**
* Gets sendAtBestTime
*
* @return bool
*/
public function getSendAtBestTime()
{
return $this->container['sendAtBestTime'];
}
/**
* Sets sendAtBestTime
*
* @param bool $sendAtBestTime Set this to true if you want to send your campaign at best time.
*
* @return $this
*/
public function setSendAtBestTime($sendAtBestTime)
{
$this->container['sendAtBestTime'] = $sendAtBestTime;
return $this;
}
/**
* Gets abTesting
*
* @return bool
*/
public function getAbTesting()
{
return $this->container['abTesting'];
}
/**
* Sets abTesting
*
* @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
*
* @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 campaign. Mandatory if abTesting = true. subjectA & subjectB should have unique value
*
* @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 campaign. Mandatory if abTesting = true. subjectA & subjectB should have unique value
*
* @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 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)
{
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($splitRule) && $splitRule < 1) {
throw new \InvalidArgumentException('invalid value for $splitRule when calling CreateEmailCampaign., must be bigger than or equal to 1.');
}
$this->container['splitRule'] = $splitRule;
return $this;
}
/**
* Gets winnerCriteria
*
* @return string
*/
public function getWinnerCriteria()
{
return $this->container['winnerCriteria'];
}
/**
* Sets winnerCriteria
*
* @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
*
* @return $this
*/
public function setWinnerCriteria($winnerCriteria)
{
$allowedValues = $this->getWinnerCriteriaAllowableValues();
if (!\is_null($winnerCriteria) && !\in_array($winnerCriteria, $allowedValues, \true)) {
throw new \InvalidArgumentException(\sprintf("Invalid value for 'winnerCriteria', must be one of '%s'", \implode("', '", $allowedValues)));
}
$this->container['winnerCriteria'] = $winnerCriteria;
return $this;
}
/**
* Gets winnerDelay
*
* @return int
*/
public function getWinnerDelay()
{
return $this->container['winnerDelay'];
}
/**
* Sets winnerDelay
*
* @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
*
* @return $this
*/
public function setWinnerDelay($winnerDelay)
{
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($winnerDelay) && $winnerDelay < 1) {
throw new \InvalidArgumentException('invalid value for $winnerDelay when calling CreateEmailCampaign., must be bigger than or equal to 1.');
}
$this->container['winnerDelay'] = $winnerDelay;
return $this;
}
/**
* Gets ipWarmupEnable
*
* @return bool
*/
public function getIpWarmupEnable()
{
return $this->container['ipWarmupEnable'];
}
/**
* Sets ipWarmupEnable
*
* @param bool $ipWarmupEnable Available for dedicated ip clients. Set this to true if you wish to warm up your ip.
*
* @return $this
*/
public function setIpWarmupEnable($ipWarmupEnable)
{
$this->container['ipWarmupEnable'] = $ipWarmupEnable;
return $this;
}
/**
* Gets initialQuota
*
* @return int
*/
public function getInitialQuota()
{
return $this->container['initialQuota'];
}
/**
* Sets initialQuota
*
* @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.
*
* @return $this
*/
public function setInitialQuota($initialQuota)
{
$this->container['initialQuota'] = $initialQuota;
return $this;
}
/**
* Gets increaseRate
*
* @return int
*/
public function getIncreaseRate()
{
return $this->container['increaseRate'];
}
/**
* Sets increaseRate
*
* @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%.
*
* @return $this
*/
public function setIncreaseRate($increaseRate)
{
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($increaseRate) && $increaseRate < 0) {
throw new \InvalidArgumentException('invalid value for $increaseRate when calling CreateEmailCampaign., must be bigger than or equal to 0.');
}
$this->container['increaseRate'] = $increaseRate;
return $this;
}
/**
* Gets unsubscriptionPageId
*
* @return string
*/
public function getUnsubscriptionPageId()
{
return $this->container['unsubscriptionPageId'];
}
/**
* Sets unsubscriptionPageId
*
* @param string $unsubscriptionPageId Enter an unsubscription page id. The page id is a 24 digit alphanumeric id that can be found in the URL when editing the page. If not entered, then the default unsubscription page will be used.
*
* @return $this
*/
public function setUnsubscriptionPageId($unsubscriptionPageId)
{
$this->container['unsubscriptionPageId'] = $unsubscriptionPageId;
return $this;
}
/**
* Gets updateFormId
*
* @return string
*/
public function getUpdateFormId()
{
return $this->container['updateFormId'];
}
/**
* Sets updateFormId
*
* @param string $updateFormId Mandatory if templateId is used containing the {{ update_profile }} tag. Enter an update profile form id. The form id is a 24 digit alphanumeric id that can be found in the URL when editing the form. If not entered, then the default update profile form will be used.
*
* @return $this
*/
public function setUpdateFormId($updateFormId)
{
$this->container['updateFormId'] = $updateFormId;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,303 @@
<?php
/**
* CreateEmailCampaignRecipients
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreateEmailCampaignRecipients Class Doc Comment
*
* @category Class
* @description Segment ids and List ids to include/exclude from campaign
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateEmailCampaignRecipients implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createEmailCampaign_recipients';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['exclusionListIds' => 'int[]', 'listIds' => 'int[]', 'segmentIds' => 'int[]'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['exclusionListIds' => 'int64', 'listIds' => 'int64', 'segmentIds' => '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 = ['exclusionListIds' => 'exclusionListIds', 'listIds' => 'listIds', 'segmentIds' => 'segmentIds'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['exclusionListIds' => 'setExclusionListIds', 'listIds' => 'setListIds', 'segmentIds' => 'setSegmentIds'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['exclusionListIds' => 'getExclusionListIds', 'listIds' => 'getListIds', 'segmentIds' => 'getSegmentIds'];
/**
* 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['exclusionListIds'] = isset($data['exclusionListIds']) ? $data['exclusionListIds'] : null;
$this->container['listIds'] = isset($data['listIds']) ? $data['listIds'] : null;
$this->container['segmentIds'] = isset($data['segmentIds']) ? $data['segmentIds'] : 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 exclusionListIds
*
* @return int[]
*/
public function getExclusionListIds()
{
return $this->container['exclusionListIds'];
}
/**
* Sets exclusionListIds
*
* @param int[] $exclusionListIds List ids to exclude from the campaign
*
* @return $this
*/
public function setExclusionListIds($exclusionListIds)
{
$this->container['exclusionListIds'] = $exclusionListIds;
return $this;
}
/**
* Gets listIds
*
* @return int[]
*/
public function getListIds()
{
return $this->container['listIds'];
}
/**
* Sets listIds
*
* @param int[] $listIds Mandatory if scheduledAt is not empty. List Ids to send the campaign to
*
* @return $this
*/
public function setListIds($listIds)
{
$this->container['listIds'] = $listIds;
return $this;
}
/**
* Gets segmentIds
*
* @return int[]
*/
public function getSegmentIds()
{
return $this->container['segmentIds'];
}
/**
* Sets segmentIds
*
* @param int[] $segmentIds Mandatory if listIds are not used. Segment ids to send the campaign to.
*
* @return $this
*/
public function setSegmentIds($segmentIds)
{
$this->container['segmentIds'] = $segmentIds;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,306 @@
<?php
/**
* CreateEmailCampaignSender
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreateEmailCampaignSender Class Doc Comment
*
* @category Class
* @description Sender details including id or email and name (optional). Only one of either Sender&#39;s email or Sender&#39;s ID shall be passed in one request at a time. For example &#x60;{\"name\":\"xyz\", \"email\":\"example@abc.com\"}&#x60; , &#x60;{\"name\":\"xyz\", \"id\":123}&#x60;
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateEmailCampaignSender implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createEmailCampaign_sender';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['name' => 'string', 'email' => 'string', 'id' => 'int'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['name' => null, 'email' => 'email', '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 = ['name' => 'name', 'email' => 'email', 'id' => 'id'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['name' => 'setName', 'email' => 'setEmail', 'id' => 'setId'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['name' => 'getName', 'email' => 'getEmail', '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['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;
}
/**
* 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 name
*
* @return string
*/
public function getName()
{
return $this->container['name'];
}
/**
* Sets name
*
* @param string $name Sender Name
*
* @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 Sender email
*
* @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 Select the sender for the campaign on the basis of sender id. In order to select a sender with specific pool of IP’s, dedicated ip users shall pass id (instead of email).
*
* @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
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,286 @@
<?php
/**
* CreateList
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreateList Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateList implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createList';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['name' => 'string', 'folderId' => 'int'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['name' => null, 'folderId' => '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', 'folderId' => 'folderId'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['name' => 'setName', 'folderId' => 'setFolderId'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['name' => 'getName', 'folderId' => 'getFolderId'];
/**
* 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['folderId'] = isset($data['folderId']) ? $data['folderId'] : 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['folderId'] === null) {
$invalidProperties[] = "'folderId' 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 the list
*
* @return $this
*/
public function setName($name)
{
$this->container['name'] = $name;
return $this;
}
/**
* Gets folderId
*
* @return int
*/
public function getFolderId()
{
return $this->container['folderId'];
}
/**
* Sets folderId
*
* @param int $folderId Id of the parent folder in which this list is to be created
*
* @return $this
*/
public function setFolderId($folderId)
{
$this->container['folderId'] = $folderId;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,261 @@
<?php
/**
* CreateModel
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreateModel Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateModel implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createModel';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['id' => '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 object 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
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,258 @@
<?php
/**
* CreateProductModel
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreateProductModel Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateProductModel implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createProductModel';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['id' => '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 = [];
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 Product when a new product is 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
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,283 @@
<?php
/**
* CreateReseller
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreateReseller Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateReseller implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createReseller';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['authKey' => 'string', 'id' => 'int'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['authKey' => null, '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 = ['authKey' => 'authKey', 'id' => 'id'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['authKey' => 'setAuthKey', 'id' => 'setId'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['authKey' => 'getAuthKey', '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['authKey'] = isset($data['authKey']) ? $data['authKey'] : 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['authKey'] === null) {
$invalidProperties[] = "'authKey' 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 authKey
*
* @return string
*/
public function getAuthKey()
{
return $this->container['authKey'];
}
/**
* Sets authKey
*
* @param string $authKey AuthKey of Reseller child created
*
* @return $this
*/
public function setAuthKey($authKey)
{
$this->container['authKey'] = $authKey;
return $this;
}
/**
* Gets id
*
* @return int
*/
public function getId()
{
return $this->container['id'];
}
/**
* Sets id
*
* @param int $id Id of Reseller child 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
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,308 @@
<?php
/**
* CreateSender
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreateSender Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateSender implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createSender';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['name' => 'string', 'email' => 'string', 'ips' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\CreateSenderIps[]'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['name' => null, 'email' => 'email', 'ips' => 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', 'ips' => 'ips'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['name' => 'setName', 'email' => 'setEmail', 'ips' => 'setIps'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['name' => 'getName', 'email' => 'getEmail', 'ips' => 'getIps'];
/**
* 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['ips'] = isset($data['ips']) ? $data['ips'] : 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['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 name
*
* @return string
*/
public function getName()
{
return $this->container['name'];
}
/**
* Sets name
*
* @param string $name From Name to use for the sender
*
* @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 From email to use for the sender. A verification email will be sent to this address.
*
* @return $this
*/
public function setEmail($email)
{
$this->container['email'] = $email;
return $this;
}
/**
* Gets ips
*
* @return \SendinBlue\Client\Model\CreateSenderIps[]
*/
public function getIps()
{
return $this->container['ips'];
}
/**
* Sets ips
*
* @param \SendinBlue\Client\Model\CreateSenderIps[] $ips Mandatory in case of dedicated IP, IPs to associate to the sender
*
* @return $this
*/
public function setIps($ips)
{
$this->container['ips'] = $ips;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,320 @@
<?php
/**
* CreateSenderIps
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreateSenderIps Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateSenderIps implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createSender_ips';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['ip' => 'string', 'domain' => 'string', 'weight' => 'int'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['ip' => null, 'domain' => null, 'weight' => '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 = ['ip' => 'ip', 'domain' => 'domain', 'weight' => 'weight'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['ip' => 'setIp', 'domain' => 'setDomain', 'weight' => 'setWeight'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['ip' => 'getIp', 'domain' => 'getDomain', 'weight' => 'getWeight'];
/**
* 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['ip'] = isset($data['ip']) ? $data['ip'] : null;
$this->container['domain'] = isset($data['domain']) ? $data['domain'] : null;
$this->container['weight'] = isset($data['weight']) ? $data['weight'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['ip'] === null) {
$invalidProperties[] = "'ip' can't be null";
}
if ($this->container['domain'] === null) {
$invalidProperties[] = "'domain' can't be null";
}
if (!\is_null($this->container['weight']) && $this->container['weight'] > 100) {
$invalidProperties[] = "invalid value for 'weight', must be smaller than or equal to 100.";
}
if (!\is_null($this->container['weight']) && $this->container['weight'] < 1) {
$invalidProperties[] = "invalid value for 'weight', 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 ip
*
* @return string
*/
public function getIp()
{
return $this->container['ip'];
}
/**
* Sets ip
*
* @param string $ip Dedicated IP available in your account
*
* @return $this
*/
public function setIp($ip)
{
$this->container['ip'] = $ip;
return $this;
}
/**
* Gets domain
*
* @return string
*/
public function getDomain()
{
return $this->container['domain'];
}
/**
* Sets domain
*
* @param string $domain Domain of the IP
*
* @return $this
*/
public function setDomain($domain)
{
$this->container['domain'] = $domain;
return $this;
}
/**
* Gets weight
*
* @return int
*/
public function getWeight()
{
return $this->container['weight'];
}
/**
* Sets weight
*
* @param int $weight Weight to apply to the IP. Sum of all IP weights must be 100. Should be passed for either ALL or NONE of the IPs. If it's not passed, the sending will be equally balanced on all IPs.
*
* @return $this
*/
public function setWeight($weight)
{
if (!\is_null($weight) && $weight > 100) {
throw new \InvalidArgumentException('invalid value for $weight when calling CreateSenderIps., must be smaller than or equal to 100.');
}
if (!\is_null($weight) && $weight < 1) {
throw new \InvalidArgumentException('invalid value for $weight when calling CreateSenderIps., must be bigger than or equal to 1.');
}
$this->container['weight'] = $weight;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,305 @@
<?php
/**
* CreateSenderModel
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreateSenderModel Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateSenderModel implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createSenderModel';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['id' => 'int', 'spfError' => 'bool', 'dkimError' => 'bool'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['id' => 'int64', 'spfError' => null, 'dkimError' => 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', 'spfError' => 'spfError', 'dkimError' => 'dkimError'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['id' => 'setId', 'spfError' => 'setSpfError', 'dkimError' => 'setDkimError'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['id' => 'getId', 'spfError' => 'getSpfError', 'dkimError' => 'getDkimError'];
/**
* 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['spfError'] = isset($data['spfError']) ? $data['spfError'] : null;
$this->container['dkimError'] = isset($data['dkimError']) ? $data['dkimError'] : 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 Sender created
*
* @return $this
*/
public function setId($id)
{
$this->container['id'] = $id;
return $this;
}
/**
* Gets spfError
*
* @return bool
*/
public function getSpfError()
{
return $this->container['spfError'];
}
/**
* Sets spfError
*
* @param bool $spfError Status of SPF configuration for the sender (true = SPF not well configured, false = SPF well configured)
*
* @return $this
*/
public function setSpfError($spfError)
{
$this->container['spfError'] = $spfError;
return $this;
}
/**
* Gets dkimError
*
* @return bool
*/
public function getDkimError()
{
return $this->container['dkimError'];
}
/**
* Sets dkimError
*
* @param bool $dkimError Status of DKIM configuration for the sender (true = DKIM not well configured, false = DKIM well configured)
*
* @return $this
*/
public function setDkimError($dkimError)
{
$this->container['dkimError'] = $dkimError;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,427 @@
<?php
/**
* CreateSmsCampaign
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreateSmsCampaign Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateSmsCampaign implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createSmsCampaign';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['name' => 'string', 'sender' => 'string', 'content' => 'string', 'recipients' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\CreateSmsCampaignRecipients', 'scheduledAt' => 'string', 'unicodeEnabled' => 'bool', 'organisationPrefix' => 'string', 'unsubscribeInstruction' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['name' => null, 'sender' => null, 'content' => null, 'recipients' => null, 'scheduledAt' => null, 'unicodeEnabled' => null, 'organisationPrefix' => null, 'unsubscribeInstruction' => 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', 'sender' => 'sender', 'content' => 'content', 'recipients' => 'recipients', 'scheduledAt' => 'scheduledAt', 'unicodeEnabled' => 'unicodeEnabled', 'organisationPrefix' => 'organisationPrefix', 'unsubscribeInstruction' => 'unsubscribeInstruction'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['name' => 'setName', 'sender' => 'setSender', 'content' => 'setContent', 'recipients' => 'setRecipients', 'scheduledAt' => 'setScheduledAt', 'unicodeEnabled' => 'setUnicodeEnabled', 'organisationPrefix' => 'setOrganisationPrefix', 'unsubscribeInstruction' => 'setUnsubscribeInstruction'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['name' => 'getName', 'sender' => 'getSender', 'content' => 'getContent', 'recipients' => 'getRecipients', 'scheduledAt' => 'getScheduledAt', 'unicodeEnabled' => 'getUnicodeEnabled', 'organisationPrefix' => 'getOrganisationPrefix', 'unsubscribeInstruction' => 'getUnsubscribeInstruction'];
/**
* 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['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['organisationPrefix'] = isset($data['organisationPrefix']) ? $data['organisationPrefix'] : null;
$this->container['unsubscribeInstruction'] = isset($data['unsubscribeInstruction']) ? $data['unsubscribeInstruction'] : 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['sender'] === null) {
$invalidProperties[] = "'sender' can't be null";
}
if (\mb_strlen($this->container['sender']) > 15) {
$invalidProperties[] = "invalid value for 'sender', the character length must be smaller than or equal to 15.";
}
if ($this->container['content'] === null) {
$invalidProperties[] = "'content' 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 the campaign
*
* @return $this
*/
public function setName($name)
{
$this->container['name'] = $name;
return $this;
}
/**
* Gets sender
*
* @return string
*/
public function getSender()
{
return $this->container['sender'];
}
/**
* Sets sender
*
* @param string $sender Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters**
*
* @return $this
*/
public function setSender($sender)
{
if (\mb_strlen($sender) > 15) {
throw new \InvalidArgumentException('invalid length for $sender when calling CreateSmsCampaign., must be smaller than or equal to 15.');
}
$this->container['sender'] = $sender;
return $this;
}
/**
* Gets content
*
* @return string
*/
public function getContent()
{
return $this->container['content'];
}
/**
* Sets content
*
* @param string $content Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS
*
* @return $this
*/
public function setContent($content)
{
$this->container['content'] = $content;
return $this;
}
/**
* Gets recipients
*
* @return \SendinBlue\Client\Model\CreateSmsCampaignRecipients
*/
public function getRecipients()
{
return $this->container['recipients'];
}
/**
* Sets recipients
*
* @param \SendinBlue\Client\Model\CreateSmsCampaignRecipients $recipients recipients
*
* @return $this
*/
public function setRecipients($recipients)
{
$this->container['recipients'] = $recipients;
return $this;
}
/**
* Gets scheduledAt
*
* @return string
*/
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'];
}
/**
* 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;
return $this;
}
/**
* Gets organisationPrefix
*
* @return string
*/
public function getOrganisationPrefix()
{
return $this->container['organisationPrefix'];
}
/**
* Sets organisationPrefix
*
* @param string $organisationPrefix A recognizable prefix will ensure your audience knows who you are. Recommended by U.S. carriers. This will be added as your Brand Name before the message content. **Prefer verifying maximum length of 160 characters including this prefix in message content to avoid multiple sending of same sms.**
*
* @return $this
*/
public function setOrganisationPrefix($organisationPrefix)
{
$this->container['organisationPrefix'] = $organisationPrefix;
return $this;
}
/**
* Gets unsubscribeInstruction
*
* @return string
*/
public function getUnsubscribeInstruction()
{
return $this->container['unsubscribeInstruction'];
}
/**
* Sets unsubscribeInstruction
*
* @param string $unsubscribeInstruction Instructions to unsubscribe from future communications. Recommended by U.S. carriers. Must include **STOP** keyword. This will be added as instructions after the end of message content. **Prefer verifying maximum length of 160 characters including this instructions in message content to avoid multiple sending of same sms.**
*
* @return $this
*/
public function setUnsubscribeInstruction($unsubscribeInstruction)
{
$this->container['unsubscribeInstruction'] = $unsubscribeInstruction;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,283 @@
<?php
/**
* CreateSmsCampaignRecipients
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreateSmsCampaignRecipients Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateSmsCampaignRecipients implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createSmsCampaign_recipients';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['listIds' => 'int[]', 'exclusionListIds' => 'int[]'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['listIds' => 'int64', 'exclusionListIds' => '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 = ['listIds' => 'listIds', 'exclusionListIds' => 'exclusionListIds'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['listIds' => 'setListIds', 'exclusionListIds' => 'setExclusionListIds'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['listIds' => 'getListIds', 'exclusionListIds' => 'getExclusionListIds'];
/**
* 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['listIds'] = isset($data['listIds']) ? $data['listIds'] : null;
$this->container['exclusionListIds'] = isset($data['exclusionListIds']) ? $data['exclusionListIds'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['listIds'] === null) {
$invalidProperties[] = "'listIds' 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 listIds
*
* @return int[]
*/
public function getListIds()
{
return $this->container['listIds'];
}
/**
* Sets listIds
*
* @param int[] $listIds Lists Ids to send the campaign to. REQUIRED if scheduledAt is not empty
*
* @return $this
*/
public function setListIds($listIds)
{
$this->container['listIds'] = $listIds;
return $this;
}
/**
* Gets exclusionListIds
*
* @return int[]
*/
public function getExclusionListIds()
{
return $this->container['exclusionListIds'];
}
/**
* Sets exclusionListIds
*
* @param int[] $exclusionListIds List ids which have to be excluded from a campaign
*
* @return $this
*/
public function setExclusionListIds($exclusionListIds)
{
$this->container['exclusionListIds'] = $exclusionListIds;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,280 @@
<?php
/**
* CreateSmtpEmail
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreateSmtpEmail Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateSmtpEmail implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createSmtpEmail';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['messageId' => 'string', 'messageIds' => 'string[]'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['messageId' => null, 'messageIds' => 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'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['messageId' => 'setMessageId', 'messageIds' => 'setMessageIds'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['messageId' => 'getMessageId', 'messageIds' => 'getMessageIds'];
/**
* 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;
}
/**
* 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 sent
*
* @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;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,465 @@
<?php
/**
* CreateSmtpTemplate
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreateSmtpTemplate Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateSmtpTemplate implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createSmtpTemplate';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['tag' => 'string', 'sender' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\CreateSmtpTemplateSender', 'templateName' => 'string', 'htmlContent' => 'string', 'htmlUrl' => 'string', 'subject' => 'string', 'replyTo' => 'string', 'toField' => 'string', 'attachmentUrl' => 'string', 'isActive' => 'bool'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['tag' => null, 'sender' => null, 'templateName' => null, 'htmlContent' => null, 'htmlUrl' => 'url', 'subject' => null, 'replyTo' => 'email', 'toField' => null, 'attachmentUrl' => 'url', 'isActive' => 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 = ['tag' => 'tag', 'sender' => 'sender', 'templateName' => 'templateName', 'htmlContent' => 'htmlContent', 'htmlUrl' => 'htmlUrl', 'subject' => 'subject', 'replyTo' => 'replyTo', 'toField' => 'toField', 'attachmentUrl' => 'attachmentUrl', 'isActive' => 'isActive'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['tag' => 'setTag', 'sender' => 'setSender', 'templateName' => 'setTemplateName', 'htmlContent' => 'setHtmlContent', 'htmlUrl' => 'setHtmlUrl', 'subject' => 'setSubject', 'replyTo' => 'setReplyTo', 'toField' => 'setToField', 'attachmentUrl' => 'setAttachmentUrl', 'isActive' => 'setIsActive'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['tag' => 'getTag', 'sender' => 'getSender', 'templateName' => 'getTemplateName', 'htmlContent' => 'getHtmlContent', 'htmlUrl' => 'getHtmlUrl', 'subject' => 'getSubject', 'replyTo' => 'getReplyTo', 'toField' => 'getToField', 'attachmentUrl' => 'getAttachmentUrl', 'isActive' => 'getIsActive'];
/**
* 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['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['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;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
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['subject'] === null) {
$invalidProperties[] = "'subject' 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 tag
*
* @return string
*/
public function getTag()
{
return $this->container['tag'];
}
/**
* Sets tag
*
* @param string $tag Tag of the template
*
* @return $this
*/
public function setTag($tag)
{
$this->container['tag'] = $tag;
return $this;
}
/**
* Gets sender
*
* @return \SendinBlue\Client\Model\CreateSmtpTemplateSender
*/
public function getSender()
{
return $this->container['sender'];
}
/**
* Sets sender
*
* @param \SendinBlue\Client\Model\CreateSmtpTemplateSender $sender sender
*
* @return $this
*/
public function setSender($sender)
{
$this->container['sender'] = $sender;
return $this;
}
/**
* Gets templateName
*
* @return string
*/
public function getTemplateName()
{
return $this->container['templateName'];
}
/**
* Sets templateName
*
* @param string $templateName Name of the template
*
* @return $this
*/
public function setTemplateName($templateName)
{
$this->container['templateName'] = $templateName;
return $this;
}
/**
* Gets htmlContent
*
* @return string
*/
public function getHtmlContent()
{
return $this->container['htmlContent'];
}
/**
* Sets htmlContent
*
* @param string $htmlContent 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)
{
$this->container['htmlContent'] = $htmlContent;
return $this;
}
/**
* Gets htmlUrl
*
* @return string
*/
public function getHtmlUrl()
{
return $this->container['htmlUrl'];
}
/**
* Sets htmlUrl
*
* @param string $htmlUrl Url which contents the body of the email message. REQUIRED if htmlContent is empty
*
* @return $this
*/
public function setHtmlUrl($htmlUrl)
{
$this->container['htmlUrl'] = $htmlUrl;
return $this;
}
/**
* Gets subject
*
* @return string
*/
public function getSubject()
{
return $this->container['subject'];
}
/**
* Sets subject
*
* @param string $subject Subject of the template
*
* @return $this
*/
public function setSubject($subject)
{
$this->container['subject'] = $subject;
return $this;
}
/**
* Gets replyTo
*
* @return string
*/
public function getReplyTo()
{
return $this->container['replyTo'];
}
/**
* Sets replyTo
*
* @param string $replyTo Email on which campaign recipients will be able to reply to
*
* @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 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)
{
$this->container['toField'] = $toField;
return $this;
}
/**
* Gets attachmentUrl
*
* @return string
*/
public function getAttachmentUrl()
{
return $this->container['attachmentUrl'];
}
/**
* Sets attachmentUrl
*
* @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
*
* @return $this
*/
public function setAttachmentUrl($attachmentUrl)
{
$this->container['attachmentUrl'] = $attachmentUrl;
return $this;
}
/**
* Gets isActive
*
* @return bool
*/
public function getIsActive()
{
return $this->container['isActive'];
}
/**
* Sets isActive
*
* @param bool $isActive Status of template. isActive = true means template is active and isActive = false means template is inactive
*
* @return $this
*/
public function setIsActive($isActive)
{
$this->container['isActive'] = $isActive;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,303 @@
<?php
/**
* CreateSmtpTemplateSender
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreateSmtpTemplateSender Class Doc Comment
*
* @category Class
* @description Sender details including id or email and name (optional). Only one of either Sender&#39;s email or Sender&#39;s ID shall be passed in one request at a time. For example &#x60;{\"name\":\"xyz\", \"email\":\"example@abc.com\"}&#x60; , &#x60;{\"name\":\"xyz\", \"id\":123}&#x60;
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateSmtpTemplateSender implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createSmtpTemplate_sender';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['name' => 'string', 'email' => 'string', 'id' => 'int'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['name' => null, 'email' => 'email', '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 = ['name' => 'name', 'email' => 'email', 'id' => 'id'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['name' => 'setName', 'email' => 'setEmail', 'id' => 'setId'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['name' => 'getName', 'email' => 'getEmail', '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['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;
}
/**
* 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 sender. If not passed, will be set to default
*
* @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 of the sender
*
* @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 Select the sender for the template on the basis of sender id. In order to select a sender with specific pool of IP’s, dedicated ip users shall pass id (instead of email).
*
* @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
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,353 @@
<?php
/**
* CreateSubAccount
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreateSubAccount Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateSubAccount implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createSubAccount';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['companyName' => '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
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,261 @@
<?php
/**
* CreateSubAccountResponse
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreateSubAccountResponse Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateSubAccountResponse implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createSubAccountResponse';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['id' => '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
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,283 @@
<?php
/**
* CreateUpdateBatchCategory
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreateUpdateBatchCategory Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateUpdateBatchCategory implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createUpdateBatchCategory';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['categories' => '\\SendinBlue\\Client\\Model\\CreateUpdateCategories[]', 'updateEnabled' => 'bool'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['categories' => null, 'updateEnabled' => 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 = ['categories' => 'categories', 'updateEnabled' => 'updateEnabled'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['categories' => 'setCategories', 'updateEnabled' => 'setUpdateEnabled'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['categories' => 'getCategories', 'updateEnabled' => 'getUpdateEnabled'];
/**
* 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['categories'] = isset($data['categories']) ? $data['categories'] : null;
$this->container['updateEnabled'] = isset($data['updateEnabled']) ? $data['updateEnabled'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['categories'] === null) {
$invalidProperties[] = "'categories' 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 categories
*
* @return \SendinBlue\Client\Model\CreateUpdateCategories[]
*/
public function getCategories()
{
return $this->container['categories'];
}
/**
* Sets categories
*
* @param \SendinBlue\Client\Model\CreateUpdateCategories[] $categories array of categories objects
*
* @return $this
*/
public function setCategories($categories)
{
$this->container['categories'] = $categories;
return $this;
}
/**
* Gets updateEnabled
*
* @return bool
*/
public function getUpdateEnabled()
{
return $this->container['updateEnabled'];
}
/**
* Sets updateEnabled
*
* @param bool $updateEnabled Facilitate to update the existing categories in the same request (updateEnabled = true)
*
* @return $this
*/
public function setUpdateEnabled($updateEnabled)
{
$this->container['updateEnabled'] = $updateEnabled;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,280 @@
<?php
/**
* CreateUpdateBatchCategoryModel
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreateUpdateBatchCategoryModel Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateUpdateBatchCategoryModel implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createUpdateBatchCategoryModel';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['createdCount' => 'int', 'updatedCount' => 'int'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['createdCount' => 'int64', 'updatedCount' => '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 = ['createdCount' => 'createdCount', 'updatedCount' => 'updatedCount'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['createdCount' => 'setCreatedCount', 'updatedCount' => 'setUpdatedCount'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['createdCount' => 'getCreatedCount', 'updatedCount' => 'getUpdatedCount'];
/**
* 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['createdCount'] = isset($data['createdCount']) ? $data['createdCount'] : null;
$this->container['updatedCount'] = isset($data['updatedCount']) ? $data['updatedCount'] : 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 createdCount
*
* @return int
*/
public function getCreatedCount()
{
return $this->container['createdCount'];
}
/**
* Sets createdCount
*
* @param int $createdCount Number of the new created categories
*
* @return $this
*/
public function setCreatedCount($createdCount)
{
$this->container['createdCount'] = $createdCount;
return $this;
}
/**
* Gets updatedCount
*
* @return int
*/
public function getUpdatedCount()
{
return $this->container['updatedCount'];
}
/**
* Sets updatedCount
*
* @param int $updatedCount Number of the existing categories updated
*
* @return $this
*/
public function setUpdatedCount($updatedCount)
{
$this->container['updatedCount'] = $updatedCount;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,283 @@
<?php
/**
* CreateUpdateBatchProducts
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreateUpdateBatchProducts Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateUpdateBatchProducts implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createUpdateBatchProducts';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['products' => '\\SendinBlue\\Client\\Model\\CreateUpdateProducts[]', 'updateEnabled' => 'bool'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['products' => null, 'updateEnabled' => 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 = ['products' => 'products', 'updateEnabled' => 'updateEnabled'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['products' => 'setProducts', 'updateEnabled' => 'setUpdateEnabled'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['products' => 'getProducts', 'updateEnabled' => 'getUpdateEnabled'];
/**
* 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['products'] = isset($data['products']) ? $data['products'] : null;
$this->container['updateEnabled'] = isset($data['updateEnabled']) ? $data['updateEnabled'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['products'] === null) {
$invalidProperties[] = "'products' 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 products
*
* @return \SendinBlue\Client\Model\CreateUpdateProducts[]
*/
public function getProducts()
{
return $this->container['products'];
}
/**
* Sets products
*
* @param \SendinBlue\Client\Model\CreateUpdateProducts[] $products array of products objects
*
* @return $this
*/
public function setProducts($products)
{
$this->container['products'] = $products;
return $this;
}
/**
* Gets updateEnabled
*
* @return bool
*/
public function getUpdateEnabled()
{
return $this->container['updateEnabled'];
}
/**
* Sets updateEnabled
*
* @param bool $updateEnabled Facilitate to update the existing categories in the same request (updateEnabled = true)
*
* @return $this
*/
public function setUpdateEnabled($updateEnabled)
{
$this->container['updateEnabled'] = $updateEnabled;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,280 @@
<?php
/**
* CreateUpdateBatchProductsModel
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreateUpdateBatchProductsModel Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateUpdateBatchProductsModel implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createUpdateBatchProductsModel';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['createdCount' => 'int', 'updatedCount' => 'int'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['createdCount' => 'int64', 'updatedCount' => '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 = ['createdCount' => 'createdCount', 'updatedCount' => 'updatedCount'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['createdCount' => 'setCreatedCount', 'updatedCount' => 'setUpdatedCount'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['createdCount' => 'getCreatedCount', 'updatedCount' => 'getUpdatedCount'];
/**
* 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['createdCount'] = isset($data['createdCount']) ? $data['createdCount'] : null;
$this->container['updatedCount'] = isset($data['updatedCount']) ? $data['updatedCount'] : 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 createdCount
*
* @return int
*/
public function getCreatedCount()
{
return $this->container['createdCount'];
}
/**
* Sets createdCount
*
* @param int $createdCount Number of the new created products
*
* @return $this
*/
public function setCreatedCount($createdCount)
{
$this->container['createdCount'] = $createdCount;
return $this;
}
/**
* Gets updatedCount
*
* @return int
*/
public function getUpdatedCount()
{
return $this->container['updatedCount'];
}
/**
* Sets updatedCount
*
* @param int $updatedCount Number of the existing products updated
*
* @return $this
*/
public function setUpdatedCount($updatedCount)
{
$this->container['updatedCount'] = $updatedCount;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,327 @@
<?php
/**
* CreateUpdateCategories
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreateUpdateCategories Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateUpdateCategories implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createUpdateCategories';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['id' => 'string', 'name' => 'string', 'url' => 'string', 'deletedAt' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['id' => 'email', 'name' => null, 'url' => null, 'deletedAt' => 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', 'name' => 'name', 'url' => 'url', 'deletedAt' => 'deletedAt'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['id' => 'setId', 'name' => 'setName', 'url' => 'setUrl', 'deletedAt' => 'setDeletedAt'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['id' => 'getId', 'name' => 'getName', 'url' => 'getUrl', 'deletedAt' => 'getDeletedAt'];
/**
* 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['name'] = isset($data['name']) ? $data['name'] : null;
$this->container['url'] = isset($data['url']) ? $data['url'] : null;
$this->container['deletedAt'] = isset($data['deletedAt']) ? $data['deletedAt'] : 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 string
*/
public function getId()
{
return $this->container['id'];
}
/**
* Sets id
*
* @param string $id Unique Category ID as saved in the shop
*
* @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 **Mandatory in case of creation**. Name of the Category, as displayed in the shop
*
* @return $this
*/
public function setName($name)
{
$this->container['name'] = $name;
return $this;
}
/**
* Gets url
*
* @return string
*/
public function getUrl()
{
return $this->container['url'];
}
/**
* Sets url
*
* @param string $url URL to the category
*
* @return $this
*/
public function setUrl($url)
{
$this->container['url'] = $url;
return $this;
}
/**
* Gets deletedAt
*
* @return string
*/
public function getDeletedAt()
{
return $this->container['deletedAt'];
}
/**
* Sets deletedAt
*
* @param string $deletedAt UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the category deleted from the shop's database
*
* @return $this
*/
public function setDeletedAt($deletedAt)
{
$this->container['deletedAt'] = $deletedAt;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,349 @@
<?php
/**
* CreateUpdateCategory
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreateUpdateCategory Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateUpdateCategory implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createUpdateCategory';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['id' => 'string', 'name' => 'string', 'url' => 'string', 'updateEnabled' => 'bool', 'deletedAt' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['id' => 'email', 'name' => null, 'url' => null, 'updateEnabled' => null, 'deletedAt' => 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', 'name' => 'name', 'url' => 'url', 'updateEnabled' => 'updateEnabled', 'deletedAt' => 'deletedAt'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['id' => 'setId', 'name' => 'setName', 'url' => 'setUrl', 'updateEnabled' => 'setUpdateEnabled', 'deletedAt' => 'setDeletedAt'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['id' => 'getId', 'name' => 'getName', 'url' => 'getUrl', 'updateEnabled' => 'getUpdateEnabled', 'deletedAt' => 'getDeletedAt'];
/**
* 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['name'] = isset($data['name']) ? $data['name'] : null;
$this->container['url'] = isset($data['url']) ? $data['url'] : null;
$this->container['updateEnabled'] = isset($data['updateEnabled']) ? $data['updateEnabled'] : \false;
$this->container['deletedAt'] = isset($data['deletedAt']) ? $data['deletedAt'] : 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 string
*/
public function getId()
{
return $this->container['id'];
}
/**
* Sets id
*
* @param string $id Unique Category ID as saved in the shop
*
* @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 **Mandatory in case of creation**. Name of the Category, as displayed in the shop
*
* @return $this
*/
public function setName($name)
{
$this->container['name'] = $name;
return $this;
}
/**
* Gets url
*
* @return string
*/
public function getUrl()
{
return $this->container['url'];
}
/**
* Sets url
*
* @param string $url URL to the category
*
* @return $this
*/
public function setUrl($url)
{
$this->container['url'] = $url;
return $this;
}
/**
* Gets updateEnabled
*
* @return bool
*/
public function getUpdateEnabled()
{
return $this->container['updateEnabled'];
}
/**
* Sets updateEnabled
*
* @param bool $updateEnabled Facilitate to update the existing category in the same request (updateEnabled = true)
*
* @return $this
*/
public function setUpdateEnabled($updateEnabled)
{
$this->container['updateEnabled'] = $updateEnabled;
return $this;
}
/**
* Gets deletedAt
*
* @return string
*/
public function getDeletedAt()
{
return $this->container['deletedAt'];
}
/**
* Sets deletedAt
*
* @param string $deletedAt UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the category deleted from the shop's database
*
* @return $this
*/
public function setDeletedAt($deletedAt)
{
$this->container['deletedAt'] = $deletedAt;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,258 @@
<?php
/**
* CreateUpdateContactModel
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreateUpdateContactModel Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateUpdateContactModel implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createUpdateContactModel';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['id' => '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 = [];
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 contact when a new contact is 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
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,258 @@
<?php
/**
* CreateUpdateFolder
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreateUpdateFolder Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateUpdateFolder implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createUpdateFolder';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['name' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['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 = ['name' => 'name'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['name' => 'setName'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['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['name'] = isset($data['name']) ? $data['name'] : 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 folder
*
* @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
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,484 @@
<?php
/**
* CreateUpdateProduct
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreateUpdateProduct Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateUpdateProduct implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createUpdateProduct';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['id' => 'string', 'name' => 'string', 'url' => 'string', 'imageUrl' => 'string', 'sku' => 'string', 'price' => 'float', 'categories' => 'string[]', 'parentId' => 'string', 'metaInfo' => 'map[string,string]', 'updateEnabled' => 'bool', 'deletedAt' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['id' => 'string', 'name' => 'string', 'url' => 'string', 'imageUrl' => 'string', 'sku' => 'string', 'price' => 'float', 'categories' => null, 'parentId' => 'string', 'metaInfo' => null, 'updateEnabled' => null, 'deletedAt' => 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', 'name' => 'name', 'url' => 'url', 'imageUrl' => 'imageUrl', 'sku' => 'sku', 'price' => 'price', 'categories' => 'categories', 'parentId' => 'parentId', 'metaInfo' => 'metaInfo', 'updateEnabled' => 'updateEnabled', 'deletedAt' => 'deletedAt'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['id' => 'setId', 'name' => 'setName', 'url' => 'setUrl', 'imageUrl' => 'setImageUrl', 'sku' => 'setSku', 'price' => 'setPrice', 'categories' => 'setCategories', 'parentId' => 'setParentId', 'metaInfo' => 'setMetaInfo', 'updateEnabled' => 'setUpdateEnabled', 'deletedAt' => 'setDeletedAt'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['id' => 'getId', 'name' => 'getName', 'url' => 'getUrl', 'imageUrl' => 'getImageUrl', 'sku' => 'getSku', 'price' => 'getPrice', 'categories' => 'getCategories', 'parentId' => 'getParentId', 'metaInfo' => 'getMetaInfo', 'updateEnabled' => 'getUpdateEnabled', 'deletedAt' => 'getDeletedAt'];
/**
* 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['name'] = isset($data['name']) ? $data['name'] : null;
$this->container['url'] = isset($data['url']) ? $data['url'] : null;
$this->container['imageUrl'] = isset($data['imageUrl']) ? $data['imageUrl'] : null;
$this->container['sku'] = isset($data['sku']) ? $data['sku'] : null;
$this->container['price'] = isset($data['price']) ? $data['price'] : null;
$this->container['categories'] = isset($data['categories']) ? $data['categories'] : null;
$this->container['parentId'] = isset($data['parentId']) ? $data['parentId'] : null;
$this->container['metaInfo'] = isset($data['metaInfo']) ? $data['metaInfo'] : null;
$this->container['updateEnabled'] = isset($data['updateEnabled']) ? $data['updateEnabled'] : \false;
$this->container['deletedAt'] = isset($data['deletedAt']) ? $data['deletedAt'] : 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['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 Product ID for which you requested the details
*
* @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 Mandatory in case of creation**. Name of the product for which you requested the details
*
* @return $this
*/
public function setName($name)
{
$this->container['name'] = $name;
return $this;
}
/**
* Gets url
*
* @return string
*/
public function getUrl()
{
return $this->container['url'];
}
/**
* Sets url
*
* @param string $url URL to the product
*
* @return $this
*/
public function setUrl($url)
{
$this->container['url'] = $url;
return $this;
}
/**
* Gets imageUrl
*
* @return string
*/
public function getImageUrl()
{
return $this->container['imageUrl'];
}
/**
* Sets imageUrl
*
* @param string $imageUrl Absolute URL to the cover image of the product
*
* @return $this
*/
public function setImageUrl($imageUrl)
{
$this->container['imageUrl'] = $imageUrl;
return $this;
}
/**
* Gets sku
*
* @return string
*/
public function getSku()
{
return $this->container['sku'];
}
/**
* Sets sku
*
* @param string $sku Product identifier from the shop
*
* @return $this
*/
public function setSku($sku)
{
$this->container['sku'] = $sku;
return $this;
}
/**
* Gets price
*
* @return float
*/
public function getPrice()
{
return $this->container['price'];
}
/**
* Sets price
*
* @param float $price Price of the product
*
* @return $this
*/
public function setPrice($price)
{
$this->container['price'] = $price;
return $this;
}
/**
* Gets categories
*
* @return string[]
*/
public function getCategories()
{
return $this->container['categories'];
}
/**
* Sets categories
*
* @param string[] $categories Category ID-s of the product
*
* @return $this
*/
public function setCategories($categories)
{
$this->container['categories'] = $categories;
return $this;
}
/**
* Gets parentId
*
* @return string
*/
public function getParentId()
{
return $this->container['parentId'];
}
/**
* Sets parentId
*
* @param string $parentId Parent product id of the product
*
* @return $this
*/
public function setParentId($parentId)
{
$this->container['parentId'] = $parentId;
return $this;
}
/**
* Gets metaInfo
*
* @return map[string,string]
*/
public function getMetaInfo()
{
return $this->container['metaInfo'];
}
/**
* Sets metaInfo
*
* @param map[string,string] $metaInfo Meta data of product such as description, vendor, producer, stock level. The size of cumulative metaInfo shall not exceed **1000 KB**. Maximum length of metaInfo object can be 10.
*
* @return $this
*/
public function setMetaInfo($metaInfo)
{
$this->container['metaInfo'] = $metaInfo;
return $this;
}
/**
* Gets updateEnabled
*
* @return bool
*/
public function getUpdateEnabled()
{
return $this->container['updateEnabled'];
}
/**
* Sets updateEnabled
*
* @param bool $updateEnabled Facilitate to update the existing category in the same request (updateEnabled = true)
*
* @return $this
*/
public function setUpdateEnabled($updateEnabled)
{
$this->container['updateEnabled'] = $updateEnabled;
return $this;
}
/**
* Gets deletedAt
*
* @return string
*/
public function getDeletedAt()
{
return $this->container['deletedAt'];
}
/**
* Sets deletedAt
*
* @param string $deletedAt UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the product deleted from the shop's database
*
* @return $this
*/
public function setDeletedAt($deletedAt)
{
$this->container['deletedAt'] = $deletedAt;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,462 @@
<?php
/**
* CreateUpdateProducts
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreateUpdateProducts Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateUpdateProducts implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createUpdateProducts';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['id' => 'string', 'name' => 'string', 'url' => 'string', 'imageUrl' => 'string', 'sku' => 'string', 'price' => 'float', 'categories' => 'string[]', 'parentId' => 'string', 'metaInfo' => 'map[string,string]', 'deletedAt' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['id' => 'string', 'name' => 'string', 'url' => 'string', 'imageUrl' => 'string', 'sku' => 'string', 'price' => 'float', 'categories' => null, 'parentId' => 'string', 'metaInfo' => null, 'deletedAt' => 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', 'name' => 'name', 'url' => 'url', 'imageUrl' => 'imageUrl', 'sku' => 'sku', 'price' => 'price', 'categories' => 'categories', 'parentId' => 'parentId', 'metaInfo' => 'metaInfo', 'deletedAt' => 'deletedAt'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['id' => 'setId', 'name' => 'setName', 'url' => 'setUrl', 'imageUrl' => 'setImageUrl', 'sku' => 'setSku', 'price' => 'setPrice', 'categories' => 'setCategories', 'parentId' => 'setParentId', 'metaInfo' => 'setMetaInfo', 'deletedAt' => 'setDeletedAt'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['id' => 'getId', 'name' => 'getName', 'url' => 'getUrl', 'imageUrl' => 'getImageUrl', 'sku' => 'getSku', 'price' => 'getPrice', 'categories' => 'getCategories', 'parentId' => 'getParentId', 'metaInfo' => 'getMetaInfo', 'deletedAt' => 'getDeletedAt'];
/**
* 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['name'] = isset($data['name']) ? $data['name'] : null;
$this->container['url'] = isset($data['url']) ? $data['url'] : null;
$this->container['imageUrl'] = isset($data['imageUrl']) ? $data['imageUrl'] : null;
$this->container['sku'] = isset($data['sku']) ? $data['sku'] : null;
$this->container['price'] = isset($data['price']) ? $data['price'] : null;
$this->container['categories'] = isset($data['categories']) ? $data['categories'] : null;
$this->container['parentId'] = isset($data['parentId']) ? $data['parentId'] : null;
$this->container['metaInfo'] = isset($data['metaInfo']) ? $data['metaInfo'] : null;
$this->container['deletedAt'] = isset($data['deletedAt']) ? $data['deletedAt'] : 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['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 Product ID for which you requested the details
*
* @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 Mandatory in case of creation**. Name of the product for which you requested the details
*
* @return $this
*/
public function setName($name)
{
$this->container['name'] = $name;
return $this;
}
/**
* Gets url
*
* @return string
*/
public function getUrl()
{
return $this->container['url'];
}
/**
* Sets url
*
* @param string $url URL to the product
*
* @return $this
*/
public function setUrl($url)
{
$this->container['url'] = $url;
return $this;
}
/**
* Gets imageUrl
*
* @return string
*/
public function getImageUrl()
{
return $this->container['imageUrl'];
}
/**
* Sets imageUrl
*
* @param string $imageUrl Absolute URL to the cover image of the product
*
* @return $this
*/
public function setImageUrl($imageUrl)
{
$this->container['imageUrl'] = $imageUrl;
return $this;
}
/**
* Gets sku
*
* @return string
*/
public function getSku()
{
return $this->container['sku'];
}
/**
* Sets sku
*
* @param string $sku Product identifier from the shop
*
* @return $this
*/
public function setSku($sku)
{
$this->container['sku'] = $sku;
return $this;
}
/**
* Gets price
*
* @return float
*/
public function getPrice()
{
return $this->container['price'];
}
/**
* Sets price
*
* @param float $price Price of the product
*
* @return $this
*/
public function setPrice($price)
{
$this->container['price'] = $price;
return $this;
}
/**
* Gets categories
*
* @return string[]
*/
public function getCategories()
{
return $this->container['categories'];
}
/**
* Sets categories
*
* @param string[] $categories Category ID-s of the product
*
* @return $this
*/
public function setCategories($categories)
{
$this->container['categories'] = $categories;
return $this;
}
/**
* Gets parentId
*
* @return string
*/
public function getParentId()
{
return $this->container['parentId'];
}
/**
* Sets parentId
*
* @param string $parentId Parent product id of the product
*
* @return $this
*/
public function setParentId($parentId)
{
$this->container['parentId'] = $parentId;
return $this;
}
/**
* Gets metaInfo
*
* @return map[string,string]
*/
public function getMetaInfo()
{
return $this->container['metaInfo'];
}
/**
* Sets metaInfo
*
* @param map[string,string] $metaInfo Meta data of product such as description, vendor, producer, stock level. The size of cumulative metaInfo shall not exceed **1000 KB**. Maximum length of metaInfo object can be 10.
*
* @return $this
*/
public function setMetaInfo($metaInfo)
{
$this->container['metaInfo'] = $metaInfo;
return $this;
}
/**
* Gets deletedAt
*
* @return string
*/
public function getDeletedAt()
{
return $this->container['deletedAt'];
}
/**
* Sets deletedAt
*
* @param string $deletedAt UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the product deleted from the shop's database
*
* @return $this
*/
public function setDeletedAt($deletedAt)
{
$this->container['deletedAt'] = $deletedAt;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,402 @@
<?php
/**
* CreateWebhook
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreateWebhook Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateWebhook implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createWebhook';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['url' => 'string', 'description' => 'string', 'events' => 'string[]', 'type' => 'string', 'domain' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['url' => 'url', 'description' => null, 'events' => null, 'type' => null, 'domain' => 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 = ['url' => 'url', 'description' => 'description', 'events' => 'events', 'type' => 'type', 'domain' => 'domain'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['url' => 'setUrl', 'description' => 'setDescription', 'events' => 'setEvents', 'type' => 'setType', 'domain' => 'setDomain'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['url' => 'getUrl', 'description' => 'getDescription', 'events' => 'getEvents', 'type' => 'getType', 'domain' => 'getDomain'];
/**
* 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 EVENTS_SENT = 'sent';
const EVENTS_HARD_BOUNCE = 'hardBounce';
const EVENTS_SOFT_BOUNCE = 'softBounce';
const EVENTS_BLOCKED = 'blocked';
const EVENTS_SPAM = 'spam';
const EVENTS_DELIVERED = 'delivered';
const EVENTS_REQUEST = 'request';
const EVENTS_CLICK = 'click';
const EVENTS_INVALID = 'invalid';
const EVENTS_DEFERRED = 'deferred';
const EVENTS_OPENED = 'opened';
const EVENTS_UNIQUE_OPENED = 'uniqueOpened';
const EVENTS_UNSUBSCRIBED = 'unsubscribed';
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';
/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getEventsAllowableValues()
{
return [self::EVENTS_SENT, self::EVENTS_HARD_BOUNCE, self::EVENTS_SOFT_BOUNCE, self::EVENTS_BLOCKED, self::EVENTS_SPAM, self::EVENTS_DELIVERED, self::EVENTS_REQUEST, self::EVENTS_CLICK, self::EVENTS_INVALID, self::EVENTS_DEFERRED, self::EVENTS_OPENED, self::EVENTS_UNIQUE_OPENED, self::EVENTS_UNSUBSCRIBED, self::EVENTS_LIST_ADDITION, self::EVENTS_CONTACT_UPDATED, self::EVENTS_CONTACT_DELETED, self::EVENTS_INBOUND_EMAIL_PROCESSED];
}
/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getTypeAllowableValues()
{
return [self::TYPE_TRANSACTIONAL, self::TYPE_MARKETING, self::TYPE_INBOUND];
}
/**
* 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['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;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['url'] === null) {
$invalidProperties[] = "'url' can't be null";
}
if ($this->container['events'] === null) {
$invalidProperties[] = "'events' 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));
}
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 the webhook
*
* @return $this
*/
public function setUrl($url)
{
$this->container['url'] = $url;
return $this;
}
/**
* Gets description
*
* @return string
*/
public function getDescription()
{
return $this->container['description'];
}
/**
* Sets description
*
* @param string $description Description of the webhook
*
* @return $this
*/
public function setDescription($description)
{
$this->container['description'] = $description;
return $this;
}
/**
* Gets events
*
* @return string[]
*/
public function getEvents()
{
return $this->container['events'];
}
/**
* 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`
*
* @return $this
*/
public function setEvents($events)
{
$allowedValues = $this->getEventsAllowableValues();
if (\array_diff($events, $allowedValues)) {
throw new \InvalidArgumentException(\sprintf("Invalid value for 'events', must be one of '%s'", \implode("', '", $allowedValues)));
}
$this->container['events'] = $events;
return $this;
}
/**
* Gets type
*
* @return string
*/
public function getType()
{
return $this->container['type'];
}
/**
* Sets type
*
* @param string $type Type of the webhook
*
* @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;
}
/**
* 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.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,261 @@
<?php
/**
* CreatedBatchId
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreatedBatchId Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreatedBatchId implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createdBatchId';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['batchId' => 'float'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['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 = ['batchId' => 'batchId'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['batchId' => 'setBatchId'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['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['batchId'] = isset($data['batchId']) ? $data['batchId'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['batchId'] === null) {
$invalidProperties[] = "'batchId' 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 batchId
*
* @return float
*/
public function getBatchId()
{
return $this->container['batchId'];
}
/**
* Sets batchId
*
* @param float $batchId Batch ID of the request
*
* @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
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,261 @@
<?php
/**
* CreatedProcessId
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* CreatedProcessId Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreatedProcessId implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'createdProcessId';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['processId' => 'int'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['processId' => '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 = ['processId' => 'processId'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['processId' => 'setProcessId'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['processId' => 'getProcessId'];
/**
* 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['processId'] = isset($data['processId']) ? $data['processId'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['processId'] === null) {
$invalidProperties[] = "'processId' 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 processId
*
* @return int
*/
public function getProcessId()
{
return $this->container['processId'];
}
/**
* Sets processId
*
* @param int $processId Id of the process created
*
* @return $this
*/
public function setProcessId($processId)
{
$this->container['processId'] = $processId;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,325 @@
<?php
/**
* Deal
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* Deal Class Doc Comment
*
* @category Class
* @description Deal Details
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class Deal implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'Deal';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['id' => 'string', 'attributes' => 'object', 'linkedContactsIds' => 'int[]', 'linkedCompaniesIds' => 'string[]'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['id' => null, 'attributes' => null, 'linkedContactsIds' => null, 'linkedCompaniesIds' => 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', 'attributes' => 'attributes', 'linkedContactsIds' => 'linkedContactsIds', 'linkedCompaniesIds' => 'linkedCompaniesIds'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['id' => 'setId', 'attributes' => 'setAttributes', 'linkedContactsIds' => 'setLinkedContactsIds', 'linkedCompaniesIds' => 'setLinkedCompaniesIds'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['id' => 'getId', 'attributes' => 'getAttributes', 'linkedContactsIds' => 'getLinkedContactsIds', 'linkedCompaniesIds' => 'getLinkedCompaniesIds'];
/**
* 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['attributes'] = isset($data['attributes']) ? $data['attributes'] : null;
$this->container['linkedContactsIds'] = isset($data['linkedContactsIds']) ? $data['linkedContactsIds'] : null;
$this->container['linkedCompaniesIds'] = isset($data['linkedCompaniesIds']) ? $data['linkedCompaniesIds'] : 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 deal id
*
* @return $this
*/
public function setId($id)
{
$this->container['id'] = $id;
return $this;
}
/**
* Gets attributes
*
* @return object
*/
public function getAttributes()
{
return $this->container['attributes'];
}
/**
* Sets attributes
*
* @param object $attributes Deal attributes with values
*
* @return $this
*/
public function setAttributes($attributes)
{
$this->container['attributes'] = $attributes;
return $this;
}
/**
* Gets linkedContactsIds
*
* @return int[]
*/
public function getLinkedContactsIds()
{
return $this->container['linkedContactsIds'];
}
/**
* Sets linkedContactsIds
*
* @param int[] $linkedContactsIds Contact ids for contacts linked to this deal
*
* @return $this
*/
public function setLinkedContactsIds($linkedContactsIds)
{
$this->container['linkedContactsIds'] = $linkedContactsIds;
return $this;
}
/**
* Gets linkedCompaniesIds
*
* @return string[]
*/
public function getLinkedCompaniesIds()
{
return $this->container['linkedCompaniesIds'];
}
/**
* Sets linkedCompaniesIds
*
* @param string[] $linkedCompaniesIds Companies ids for companies linked to this deal
*
* @return $this
*/
public function setLinkedCompaniesIds($linkedCompaniesIds)
{
$this->container['linkedCompaniesIds'] = $linkedCompaniesIds;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,347 @@
<?php
/**
* DealAttributesInner
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* DealAttributesInner Class Doc Comment
*
* @category Class
* @description List of attributes
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class DealAttributesInner implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'DealAttributes_inner';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['internalName' => 'string', 'label' => 'string', 'attributeTypeName' => 'string', 'attributeOptions' => 'object[]', 'isRequired' => 'bool'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['internalName' => null, 'label' => null, 'attributeTypeName' => null, 'attributeOptions' => null, 'isRequired' => 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 = ['internalName' => 'internalName', 'label' => 'label', 'attributeTypeName' => 'attributeTypeName', 'attributeOptions' => 'attributeOptions', 'isRequired' => 'isRequired'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['internalName' => 'setInternalName', 'label' => 'setLabel', 'attributeTypeName' => 'setAttributeTypeName', 'attributeOptions' => 'setAttributeOptions', 'isRequired' => 'setIsRequired'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['internalName' => 'getInternalName', 'label' => 'getLabel', 'attributeTypeName' => 'getAttributeTypeName', 'attributeOptions' => 'getAttributeOptions', 'isRequired' => 'getIsRequired'];
/**
* 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['internalName'] = isset($data['internalName']) ? $data['internalName'] : null;
$this->container['label'] = isset($data['label']) ? $data['label'] : null;
$this->container['attributeTypeName'] = isset($data['attributeTypeName']) ? $data['attributeTypeName'] : null;
$this->container['attributeOptions'] = isset($data['attributeOptions']) ? $data['attributeOptions'] : null;
$this->container['isRequired'] = isset($data['isRequired']) ? $data['isRequired'] : 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 internalName
*
* @return string
*/
public function getInternalName()
{
return $this->container['internalName'];
}
/**
* Sets internalName
*
* @param string $internalName internalName
*
* @return $this
*/
public function setInternalName($internalName)
{
$this->container['internalName'] = $internalName;
return $this;
}
/**
* Gets label
*
* @return string
*/
public function getLabel()
{
return $this->container['label'];
}
/**
* Sets label
*
* @param string $label label
*
* @return $this
*/
public function setLabel($label)
{
$this->container['label'] = $label;
return $this;
}
/**
* Gets attributeTypeName
*
* @return string
*/
public function getAttributeTypeName()
{
return $this->container['attributeTypeName'];
}
/**
* Sets attributeTypeName
*
* @param string $attributeTypeName attributeTypeName
*
* @return $this
*/
public function setAttributeTypeName($attributeTypeName)
{
$this->container['attributeTypeName'] = $attributeTypeName;
return $this;
}
/**
* Gets attributeOptions
*
* @return object[]
*/
public function getAttributeOptions()
{
return $this->container['attributeOptions'];
}
/**
* Sets attributeOptions
*
* @param object[] $attributeOptions attributeOptions
*
* @return $this
*/
public function setAttributeOptions($attributeOptions)
{
$this->container['attributeOptions'] = $attributeOptions;
return $this;
}
/**
* Gets isRequired
*
* @return bool
*/
public function getIsRequired()
{
return $this->container['isRequired'];
}
/**
* Sets isRequired
*
* @param bool $isRequired isRequired
*
* @return $this
*/
public function setIsRequired($isRequired)
{
$this->container['isRequired'] = $isRequired;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
@@ -0,0 +1,259 @@
<?php
/**
* DealsList
*
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* SendinBlue API
*
* SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
*
* 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.29
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace WPMailSMTP\Vendor\SendinBlue\Client\Model;
use ArrayAccess;
use WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer;
/**
* DealsList Class Doc Comment
*
* @category Class
* @description List of Deals
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class DealsList implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'DealsList';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['items' => '\\SendinBlue\\Client\\Model\\Deal[]'];
/**
* 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\Deal[]
*/
public function getItems()
{
return $this->container['items'];
}
/**
* Sets items
*
* @param \SendinBlue\Client\Model\Deal[] $items List of deals
*
* @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
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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
*/
#[\ReturnTypeWillChange]
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(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
Loaded 100 of 13389 files, more files were not shown because too many files have changed in this diff. Show more