updated plugin WP Mail SMTP version 2.4.0

This commit is contained in:
2020-09-25 14:44:17 +00:00
committed by Gitium
parent 4f3d745449
commit 3053837189
673 changed files with 31869 additions and 65613 deletions

View File

@ -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.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\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\build_query($formParams);
}
}
// this endpoint requires API key authentication
$apiKey = $this->config->getApiKeyWithPrefix('api-key');
if ($apiKey !== null) {
$headers['api-key'] = $apiKey;
}
// this endpoint requires API key authentication
$apiKey = $this->config->getApiKeyWithPrefix('partner-key');
if ($apiKey !== null) {
$headers['partner-key'] = $apiKey;
}
$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
}
$headers = \array_merge($defaultHeaders, $headerParams, $headers);
$query = \WPMailSMTP\Vendor\GuzzleHttp\Psr7\build_query($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;
}
}

View File

@ -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.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\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\build_query($formParams);
}
}
// this endpoint requires API key authentication
$apiKey = $this->config->getApiKeyWithPrefix('api-key');
if ($apiKey !== null) {
$headers['api-key'] = $apiKey;
}
// this endpoint requires API key authentication
$apiKey = $this->config->getApiKeyWithPrefix('partner-key');
if ($apiKey !== null) {
$headers['partner-key'] = $apiKey;
}
$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
}
$headers = \array_merge($defaultHeaders, $headerParams, $headers);
$query = \WPMailSMTP\Vendor\GuzzleHttp\Psr7\build_query($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\build_query($formParams);
}
}
// this endpoint requires API key authentication
$apiKey = $this->config->getApiKeyWithPrefix('api-key');
if ($apiKey !== null) {
$headers['api-key'] = $apiKey;
}
// this endpoint requires API key authentication
$apiKey = $this->config->getApiKeyWithPrefix('partner-key');
if ($apiKey !== null) {
$headers['partner-key'] = $apiKey;
}
$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
}
$headers = \array_merge($defaultHeaders, $headerParams, $headers);
$query = \WPMailSMTP\Vendor\GuzzleHttp\Psr7\build_query($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\build_query($formParams);
}
}
// this endpoint requires API key authentication
$apiKey = $this->config->getApiKeyWithPrefix('api-key');
if ($apiKey !== null) {
$headers['api-key'] = $apiKey;
}
// this endpoint requires API key authentication
$apiKey = $this->config->getApiKeyWithPrefix('partner-key');
if ($apiKey !== null) {
$headers['partner-key'] = $apiKey;
}
$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
}
$headers = \array_merge($defaultHeaders, $headerParams, $headers);
$query = \WPMailSMTP\Vendor\GuzzleHttp\Psr7\build_query($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\build_query($formParams);
}
}
// this endpoint requires API key authentication
$apiKey = $this->config->getApiKeyWithPrefix('api-key');
if ($apiKey !== null) {
$headers['api-key'] = $apiKey;
}
// this endpoint requires API key authentication
$apiKey = $this->config->getApiKeyWithPrefix('partner-key');
if ($apiKey !== null) {
$headers['partner-key'] = $apiKey;
}
$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
}
$headers = \array_merge($defaultHeaders, $headerParams, $headers);
$query = \WPMailSMTP\Vendor\GuzzleHttp\Psr7\build_query($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;
}
}

View File

@ -0,0 +1,494 @@
<?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.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\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 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 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\build_query($formParams);
}
}
// this endpoint requires API key authentication
$apiKey = $this->config->getApiKeyWithPrefix('api-key');
if ($apiKey !== null) {
$headers['api-key'] = $apiKey;
}
// this endpoint requires API key authentication
$apiKey = $this->config->getApiKeyWithPrefix('partner-key');
if ($apiKey !== null) {
$headers['partner-key'] = $apiKey;
}
$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
}
$headers = \array_merge($defaultHeaders, $headerParams, $headers);
$query = \WPMailSMTP\Vendor\GuzzleHttp\Psr7\build_query($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)
*
* @throws \SendinBlue\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return \SendinBlue\Client\Model\GetProcesses
*/
public function getProcesses($limit = '10', $offset = '0')
{
list($response) = $this->getProcessesWithHttpInfo($limit, $offset);
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)
*
* @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')
{
$returnType = 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetProcesses';
$request = $this->getProcessesRequest($limit, $offset);
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)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function getProcessesAsync($limit = '10', $offset = '0')
{
return $this->getProcessesAsyncWithHttpInfo($limit, $offset)->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)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function getProcessesAsyncWithHttpInfo($limit = '10', $offset = '0')
{
$returnType = 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetProcesses';
$request = $this->getProcessesRequest($limit, $offset);
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)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
protected function getProcessesRequest($limit = '10', $offset = '0')
{
if ($limit !== null && $limit > 50) {
throw new \InvalidArgumentException('invalid value for "$limit" when calling ProcessApi.getProcesses, must be smaller than or equal to 50.');
}
$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);
}
// 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\build_query($formParams);
}
}
// this endpoint requires API key authentication
$apiKey = $this->config->getApiKeyWithPrefix('api-key');
if ($apiKey !== null) {
$headers['api-key'] = $apiKey;
}
// this endpoint requires API key authentication
$apiKey = $this->config->getApiKeyWithPrefix('partner-key');
if ($apiKey !== null) {
$headers['partner-key'] = $apiKey;
}
$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
}
$headers = \array_merge($defaultHeaders, $headerParams, $headers);
$query = \WPMailSMTP\Vendor\GuzzleHttp\Psr7\build_query($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;
}
}

View File

@ -0,0 +1,979 @@
<?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.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\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)
*
* @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)
{
list($response) = $this->getSmsEventsWithHttpInfo($limit, $startDate, $endDate, $offset, $days, $phoneNumber, $event, $tags);
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)
*
* @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)
{
$returnType = 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetSmsEventReport';
$request = $this->getSmsEventsRequest($limit, $startDate, $endDate, $offset, $days, $phoneNumber, $event, $tags);
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)
*
* @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)
{
return $this->getSmsEventsAsyncWithHttpInfo($limit, $startDate, $endDate, $offset, $days, $phoneNumber, $event, $tags)->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)
*
* @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)
{
$returnType = 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetSmsEventReport';
$request = $this->getSmsEventsRequest($limit, $startDate, $endDate, $offset, $days, $phoneNumber, $event, $tags);
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)
*
* @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)
{
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);
}
// 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\build_query($formParams);
}
}
// this endpoint requires API key authentication
$apiKey = $this->config->getApiKeyWithPrefix('api-key');
if ($apiKey !== null) {
$headers['api-key'] = $apiKey;
}
// this endpoint requires API key authentication
$apiKey = $this->config->getApiKeyWithPrefix('partner-key');
if ($apiKey !== null) {
$headers['partner-key'] = $apiKey;
}
$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
}
$headers = \array_merge($defaultHeaders, $headerParams, $headers);
$query = \WPMailSMTP\Vendor\GuzzleHttp\Psr7\build_query($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\build_query($formParams);
}
}
// this endpoint requires API key authentication
$apiKey = $this->config->getApiKeyWithPrefix('api-key');
if ($apiKey !== null) {
$headers['api-key'] = $apiKey;
}
// this endpoint requires API key authentication
$apiKey = $this->config->getApiKeyWithPrefix('partner-key');
if ($apiKey !== null) {
$headers['partner-key'] = $apiKey;
}
$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
}
$headers = \array_merge($defaultHeaders, $headerParams, $headers);
$query = \WPMailSMTP\Vendor\GuzzleHttp\Psr7\build_query($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)
*
* @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)
{
list($response) = $this->getTransacSmsReportWithHttpInfo($startDate, $endDate, $days, $tag);
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)
*
* @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)
{
$returnType = 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetTransacSmsReport';
$request = $this->getTransacSmsReportRequest($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\\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)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function getTransacSmsReportAsync($startDate = null, $endDate = null, $days = null, $tag = null)
{
return $this->getTransacSmsReportAsyncWithHttpInfo($startDate, $endDate, $days, $tag)->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)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function getTransacSmsReportAsyncWithHttpInfo($startDate = null, $endDate = null, $days = null, $tag = null)
{
$returnType = 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetTransacSmsReport';
$request = $this->getTransacSmsReportRequest($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 '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)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
protected function getTransacSmsReportRequest($startDate = null, $endDate = null, $days = null, $tag = null)
{
$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);
}
// 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\build_query($formParams);
}
}
// this endpoint requires API key authentication
$apiKey = $this->config->getApiKeyWithPrefix('api-key');
if ($apiKey !== null) {
$headers['api-key'] = $apiKey;
}
// this endpoint requires API key authentication
$apiKey = $this->config->getApiKeyWithPrefix('partner-key');
if ($apiKey !== null) {
$headers['partner-key'] = $apiKey;
}
$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
}
$headers = \array_merge($defaultHeaders, $headerParams, $headers);
$query = \WPMailSMTP\Vendor\GuzzleHttp\Psr7\build_query($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\build_query($formParams);
}
}
// this endpoint requires API key authentication
$apiKey = $this->config->getApiKeyWithPrefix('api-key');
if ($apiKey !== null) {
$headers['api-key'] = $apiKey;
}
// this endpoint requires API key authentication
$apiKey = $this->config->getApiKeyWithPrefix('partner-key');
if ($apiKey !== null) {
$headers['partner-key'] = $apiKey;
}
$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
}
$headers = \array_merge($defaultHeaders, $headerParams, $headers);
$query = \WPMailSMTP\Vendor\GuzzleHttp\Psr7\build_query($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;
}
}

View File

@ -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.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;
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;
}
}

View File

@ -0,0 +1,386 @@
<?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.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;
/**
* Configuration Class Doc Comment
* PHP version 5
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
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();
}
/**
* 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;
}
}

View File

@ -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.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;
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);
}
}
}

View File

@ -0,0 +1,405 @@
<?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.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;
/**
* 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'];
/**
* 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];
/**
* 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'];
/**
* 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'];
/**
* 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'];
/**
* 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;
}
/**
* 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;
}
/**
* 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));
}
}

View File

@ -0,0 +1,254 @@
<?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.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;
/**
* 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
*/
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));
}
}

View File

@ -0,0 +1,254 @@
<?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.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;
/**
* 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[]'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['emails' => '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 = ['emails' => 'emails'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['emails' => 'setEmails'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['emails' => 'getEmails'];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$swaggerModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['emails'] = isset($data['emails']) ? $data['emails'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return \count($this->listInvalidProperties()) === 0;
}
/**
* Gets emails
*
* @return string[]
*/
public function getEmails()
{
return $this->container['emails'];
}
/**
* Sets emails
*
* @param string[] $emails Emails to add to a list. You can pass a maximum of 150 emails for addition in one request. If you need to add the emails in bulk, please prefer /contacts/import api.
*
* @return $this
*/
public function setEmails($emails)
{
$this->container['emails'] = $emails;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
{
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
{
if (\is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
{
unset($this->container[$offset]);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (\defined('JSON_PRETTY_PRINT')) {
// use JSON pretty print
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -0,0 +1,276 @@
<?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.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;
/**
* 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
*/
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));
}
}

View File

@ -0,0 +1,321 @@
<?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.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;
/**
* 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', '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, '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', 'enumeration' => 'enumeration', 'type' => 'type'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['value' => 'setValue', 'enumeration' => 'setEnumeration', 'type' => 'setType'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['value' => 'getValue', '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['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 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
*/
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));
}
}

View File

@ -0,0 +1,282 @@
<?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.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;
/**
* 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
*/
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));
}
}

View File

@ -0,0 +1,402 @@
<?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.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;
/**
* 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
*/
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));
}
}

View File

@ -0,0 +1,386 @@
<?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.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;
/**
* 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. 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
*/
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));
}
}

View File

@ -0,0 +1,373 @@
<?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.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;
/**
* 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";
}
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
*/
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));
}
}

View File

@ -0,0 +1,909 @@
<?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.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;
/**
* 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' => '\\DateTime', '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'];
/**
* 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' => 'date-time', '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'];
/**
* 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'];
/**
* 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'];
/**
* 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'];
/**
* 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;
}
/**
* 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 \DateTime
*/
public function getScheduledAt()
{
return $this->container['scheduledAt'];
}
/**
* Sets scheduledAt
*
* @param \DateTime $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;
}
/**
* 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));
}
}

View File

@ -0,0 +1,277 @@
<?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.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;
/**
* CreateEmailCampaignRecipients Class Doc Comment
*
* @category Class
* @description 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[]'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['exclusionListIds' => 'int64', 'listIds' => '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'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['exclusionListIds' => 'setExclusionListIds', 'listIds' => 'setListIds'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['exclusionListIds' => 'getExclusionListIds', 'listIds' => 'getListIds'];
/**
* 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;
}
/**
* 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;
}
/**
* 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));
}
}

View File

@ -0,0 +1,302 @@
<?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.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;
/**
* 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;{\&quot;name\&quot;:\&quot;xyz\&quot;, \&quot;email\&quot;:\&quot;example@abc.com\&quot;}&#x60; , &#x60;{\&quot;name\&quot;:\&quot;xyz\&quot;, \&quot;id\&quot;: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 IPs, 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
*/
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));
}
}

View File

@ -0,0 +1,282 @@
<?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.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;
/**
* 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
*/
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));
}
}

View File

@ -0,0 +1,257 @@
<?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.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;
/**
* 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
*/
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));
}
}

View File

@ -0,0 +1,279 @@
<?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.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;
/**
* 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
*/
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));
}
}

View File

@ -0,0 +1,304 @@
<?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.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;
/**
* 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
*/
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));
}
}

View File

@ -0,0 +1,316 @@
<?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.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;
/**
* 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
*/
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));
}
}

View File

@ -0,0 +1,301 @@
<?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.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;
/**
* 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
*/
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));
}
}

View File

@ -0,0 +1,357 @@
<?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.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;
/**
* 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' => '\\DateTime'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['name' => null, 'sender' => null, 'content' => null, 'recipients' => null, 'scheduledAt' => '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 = ['name' => 'name', 'sender' => 'sender', 'content' => 'content', 'recipients' => 'recipients', 'scheduledAt' => 'scheduledAt'];
/**
* 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'];
/**
* 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'];
/**
* 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;
}
/**
* 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']) > 11) {
$invalidProperties[] = "invalid value for 'sender', the character length must be smaller than or equal to 11.";
}
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
*
* @return $this
*/
public function setSender($sender)
{
if (\mb_strlen($sender) > 11) {
throw new \InvalidArgumentException('invalid length for $sender when calling CreateSmsCampaign., must be smaller than or equal to 11.');
}
$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 \DateTime
*/
public function getScheduledAt()
{
return $this->container['scheduledAt'];
}
/**
* Sets scheduledAt
*
* @param \DateTime $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;
}
/**
* 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));
}
}

View File

@ -0,0 +1,279 @@
<?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.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;
/**
* 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
*/
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));
}
}

View File

@ -0,0 +1,257 @@
<?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.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;
/**
* 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'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['messageId' => 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'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['messageId' => 'setMessageId'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['messageId' => 'getMessageId'];
/**
* 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;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['messageId'] === null) {
$invalidProperties[] = "'messageId' 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 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;
}
/**
* 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));
}
}

View File

@ -0,0 +1,461 @@
<?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.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;
/**
* 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
*/
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));
}
}

View File

@ -0,0 +1,302 @@
<?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.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;
/**
* 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;{\&quot;name\&quot;:\&quot;xyz\&quot;, \&quot;email\&quot;:\&quot;example@abc.com\&quot;}&#x60; , &#x60;{\&quot;name\&quot;:\&quot;xyz\&quot;, \&quot;id\&quot;: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 = [];
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 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 IPs, 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
*/
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));
}
}

View File

@ -0,0 +1,254 @@
<?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.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;
/**
* 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
*/
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));
}
}

View File

@ -0,0 +1,254 @@
<?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.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;
/**
* 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
*/
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));
}
}

View File

@ -0,0 +1,374 @@
<?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.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;
/**
* 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'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['url' => 'url', 'description' => null, 'events' => 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 = ['url' => 'url', 'description' => 'description', 'events' => 'events', 'type' => 'type'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['url' => 'setUrl', 'description' => 'setDescription', 'events' => 'setEvents', 'type' => 'setType'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['url' => 'getUrl', 'description' => 'getDescription', 'events' => 'getEvents', '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 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 TYPE_TRANSACTIONAL = 'transactional';
const TYPE_MARKETING = 'marketing';
/**
* 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];
}
/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getTypeAllowableValues()
{
return [self::TYPE_TRANSACTIONAL, self::TYPE_MARKETING];
}
/**
* 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';
}
/**
* 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, request, delivered, hardBounce, softBounce, blocked, spam, invalid, deferred, click, opened, uniqueOpened and unsubscribed and possible values for Marketing type webhook spam, opened, click, hardBounce, softBounce, unsubscribed, listAddition & delivered
*
* @return $this
*/
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;
}
/**
* 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));
}
}

View File

@ -0,0 +1,257 @@
<?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.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;
/**
* 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
*/
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));
}
}

View File

@ -0,0 +1,298 @@
<?php
/**
* DeleteHardbounces
*
* 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;
/**
* DeleteHardbounces Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class DeleteHardbounces implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'deleteHardbounces';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['startDate' => 'string', 'endDate' => 'string', 'contactEmail' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['startDate' => null, 'endDate' => null, 'contactEmail' => '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 = ['startDate' => 'startDate', 'endDate' => 'endDate', 'contactEmail' => 'contactEmail'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['startDate' => 'setStartDate', 'endDate' => 'setEndDate', 'contactEmail' => 'setContactEmail'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['startDate' => 'getStartDate', 'endDate' => 'getEndDate', 'contactEmail' => 'getContactEmail'];
/**
* 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['startDate'] = isset($data['startDate']) ? $data['startDate'] : null;
$this->container['endDate'] = isset($data['endDate']) ? $data['endDate'] : null;
$this->container['contactEmail'] = isset($data['contactEmail']) ? $data['contactEmail'] : null;
}
/**
* 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 startDate
*
* @return string
*/
public function getStartDate()
{
return $this->container['startDate'];
}
/**
* Sets startDate
*
* @param string $startDate Starting date (YYYY-MM-DD) of the time period for deletion. The hardbounces occurred after this date will be deleted. Must be less than or equal to the endDate
*
* @return $this
*/
public function setStartDate($startDate)
{
$this->container['startDate'] = $startDate;
return $this;
}
/**
* Gets endDate
*
* @return string
*/
public function getEndDate()
{
return $this->container['endDate'];
}
/**
* Sets endDate
*
* @param string $endDate Ending date (YYYY-MM-DD) of the time period for deletion. The hardbounces until this date will be deleted. Must be greater than or equal to the startDate
*
* @return $this
*/
public function setEndDate($endDate)
{
$this->container['endDate'] = $endDate;
return $this;
}
/**
* Gets contactEmail
*
* @return string
*/
public function getContactEmail()
{
return $this->container['contactEmail'];
}
/**
* Sets contactEmail
*
* @param string $contactEmail Target a specific email address
*
* @return $this
*/
public function setContactEmail($contactEmail)
{
$this->container['contactEmail'] = $contactEmail;
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));
}
}

View File

@ -0,0 +1,304 @@
<?php
/**
* EmailExportRecipients
*
* 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;
/**
* EmailExportRecipients Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class EmailExportRecipients implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'emailExportRecipients';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['notifyURL' => 'string', 'recipientsType' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['notifyURL' => 'url', 'recipientsType' => 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 = ['notifyURL' => 'notifyURL', 'recipientsType' => 'recipientsType'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['notifyURL' => 'setNotifyURL', 'recipientsType' => 'setRecipientsType'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['notifyURL' => 'getNotifyURL', 'recipientsType' => 'getRecipientsType'];
/**
* 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 RECIPIENTS_TYPE_ALL = 'all';
const RECIPIENTS_TYPE_NON_CLICKERS = 'nonClickers';
const RECIPIENTS_TYPE_NON_OPENERS = 'nonOpeners';
const RECIPIENTS_TYPE_CLICKERS = 'clickers';
const RECIPIENTS_TYPE_OPENERS = 'openers';
const RECIPIENTS_TYPE_SOFT_BOUNCES = 'softBounces';
const RECIPIENTS_TYPE_HARD_BOUNCES = 'hardBounces';
const RECIPIENTS_TYPE_UNSUBSCRIBED = 'unsubscribed';
/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getRecipientsTypeAllowableValues()
{
return [self::RECIPIENTS_TYPE_ALL, self::RECIPIENTS_TYPE_NON_CLICKERS, self::RECIPIENTS_TYPE_NON_OPENERS, self::RECIPIENTS_TYPE_CLICKERS, self::RECIPIENTS_TYPE_OPENERS, self::RECIPIENTS_TYPE_SOFT_BOUNCES, self::RECIPIENTS_TYPE_HARD_BOUNCES, self::RECIPIENTS_TYPE_UNSUBSCRIBED];
}
/**
* 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['notifyURL'] = isset($data['notifyURL']) ? $data['notifyURL'] : null;
$this->container['recipientsType'] = isset($data['recipientsType']) ? $data['recipientsType'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['recipientsType'] === null) {
$invalidProperties[] = "'recipientsType' can't be null";
}
$allowedValues = $this->getRecipientsTypeAllowableValues();
if (!\is_null($this->container['recipientsType']) && !\in_array($this->container['recipientsType'], $allowedValues, \true)) {
$invalidProperties[] = \sprintf("invalid value for 'recipientsType', 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 notifyURL
*
* @return string
*/
public function getNotifyURL()
{
return $this->container['notifyURL'];
}
/**
* Sets notifyURL
*
* @param string $notifyURL Webhook called once the export process is finished. For reference, https://help.sendinblue.com/hc/en-us/articles/360007666479
*
* @return $this
*/
public function setNotifyURL($notifyURL)
{
$this->container['notifyURL'] = $notifyURL;
return $this;
}
/**
* Gets recipientsType
*
* @return string
*/
public function getRecipientsType()
{
return $this->container['recipientsType'];
}
/**
* Sets recipientsType
*
* @param string $recipientsType Type of recipients to export for a campaign
*
* @return $this
*/
public function setRecipientsType($recipientsType)
{
$allowedValues = $this->getRecipientsTypeAllowableValues();
if (!\in_array($recipientsType, $allowedValues, \true)) {
throw new \InvalidArgumentException(\sprintf("Invalid value for 'recipientsType', must be one of '%s'", \implode("', '", $allowedValues)));
}
$this->container['recipientsType'] = $recipientsType;
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));
}
}

View File

@ -0,0 +1,314 @@
<?php
/**
* ErrorModel
*
* 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;
/**
* ErrorModel Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class ErrorModel implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'errorModel';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['code' => 'string', 'message' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['code' => null, 'message' => 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 = ['code' => 'code', 'message' => 'message'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['code' => 'setCode', 'message' => 'setMessage'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['code' => 'getCode', 'message' => 'getMessage'];
/**
* 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 CODE_INVALID_PARAMETER = 'invalid_parameter';
const CODE_MISSING_PARAMETER = 'missing_parameter';
const CODE_OUT_OF_RANGE = 'out_of_range';
const CODE_CAMPAIGN_PROCESSING = 'campaign_processing';
const CODE_CAMPAIGN_SENT = 'campaign_sent';
const CODE_DOCUMENT_NOT_FOUND = 'document_not_found';
const CODE_RESELLER_PERMISSION_DENIED = 'reseller_permission_denied';
const CODE_NOT_ENOUGH_CREDITS = 'not_enough_credits';
const CODE_PERMISSION_DENIED = 'permission_denied';
const CODE_DUPLICATE_PARAMETER = 'duplicate_parameter';
const CODE_DUPLICATE_REQUEST = 'duplicate_request';
const CODE_METHOD_NOT_ALLOWED = 'method_not_allowed';
const CODE_UNAUTHORIZED = 'unauthorized';
const CODE_ACCOUNT_UNDER_VALIDATION = 'account_under_validation';
const CODE_NOT_ACCEPTABLE = 'not_acceptable';
/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getCodeAllowableValues()
{
return [self::CODE_INVALID_PARAMETER, self::CODE_MISSING_PARAMETER, self::CODE_OUT_OF_RANGE, self::CODE_CAMPAIGN_PROCESSING, self::CODE_CAMPAIGN_SENT, self::CODE_DOCUMENT_NOT_FOUND, self::CODE_RESELLER_PERMISSION_DENIED, self::CODE_NOT_ENOUGH_CREDITS, self::CODE_PERMISSION_DENIED, self::CODE_DUPLICATE_PARAMETER, self::CODE_DUPLICATE_REQUEST, self::CODE_METHOD_NOT_ALLOWED, self::CODE_UNAUTHORIZED, self::CODE_ACCOUNT_UNDER_VALIDATION, self::CODE_NOT_ACCEPTABLE];
}
/**
* 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['code'] = isset($data['code']) ? $data['code'] : null;
$this->container['message'] = isset($data['message']) ? $data['message'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['code'] === null) {
$invalidProperties[] = "'code' can't be null";
}
$allowedValues = $this->getCodeAllowableValues();
if (!\is_null($this->container['code']) && !\in_array($this->container['code'], $allowedValues, \true)) {
$invalidProperties[] = \sprintf("invalid value for 'code', must be one of '%s'", \implode("', '", $allowedValues));
}
if ($this->container['message'] === null) {
$invalidProperties[] = "'message' 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 code
*
* @return string
*/
public function getCode()
{
return $this->container['code'];
}
/**
* Sets code
*
* @param string $code Error code displayed in case of a failure
*
* @return $this
*/
public function setCode($code)
{
$allowedValues = $this->getCodeAllowableValues();
if (!\in_array($code, $allowedValues, \true)) {
throw new \InvalidArgumentException(\sprintf("Invalid value for 'code', must be one of '%s'", \implode("', '", $allowedValues)));
}
$this->container['code'] = $code;
return $this;
}
/**
* Gets message
*
* @return string
*/
public function getMessage()
{
return $this->container['message'];
}
/**
* Sets message
*
* @param string $message Readable message associated to the failure
*
* @return $this
*/
public function setMessage($message)
{
$this->container['message'] = $message;
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));
}
}

View File

@ -0,0 +1,429 @@
<?php
/**
* GetAccount
*
* 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;
/**
* GetAccount Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetAccount implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getAccount';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['email' => 'string', 'firstName' => 'string', 'lastName' => 'string', 'companyName' => 'string', 'address' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetExtendedClientAddress', 'plan' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetAccountPlan[]', 'relay' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetAccountRelay', 'marketingAutomation' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetAccountMarketingAutomation'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['email' => 'email', 'firstName' => null, 'lastName' => null, 'companyName' => null, 'address' => null, 'plan' => null, 'relay' => null, 'marketingAutomation' => 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', 'address' => 'address', 'plan' => 'plan', 'relay' => 'relay', 'marketingAutomation' => 'marketingAutomation'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['email' => 'setEmail', 'firstName' => 'setFirstName', 'lastName' => 'setLastName', 'companyName' => 'setCompanyName', 'address' => 'setAddress', 'plan' => 'setPlan', 'relay' => 'setRelay', 'marketingAutomation' => 'setMarketingAutomation'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['email' => 'getEmail', 'firstName' => 'getFirstName', 'lastName' => 'getLastName', 'companyName' => 'getCompanyName', 'address' => 'getAddress', 'plan' => 'getPlan', 'relay' => 'getRelay', 'marketingAutomation' => 'getMarketingAutomation'];
/**
* 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['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['address'] = isset($data['address']) ? $data['address'] : null;
$this->container['plan'] = isset($data['plan']) ? $data['plan'] : null;
$this->container['relay'] = isset($data['relay']) ? $data['relay'] : null;
$this->container['marketingAutomation'] = isset($data['marketingAutomation']) ? $data['marketingAutomation'] : null;
}
/**
* 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['address'] === null) {
$invalidProperties[] = "'address' can't be null";
}
if ($this->container['plan'] === null) {
$invalidProperties[] = "'plan' can't be null";
}
if ($this->container['relay'] === null) {
$invalidProperties[] = "'relay' 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 Login Email
*
* @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
*
* @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
*
* @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 Name of the company
*
* @return $this
*/
public function setCompanyName($companyName)
{
$this->container['companyName'] = $companyName;
return $this;
}
/**
* Gets address
*
* @return \SendinBlue\Client\Model\GetExtendedClientAddress
*/
public function getAddress()
{
return $this->container['address'];
}
/**
* Sets address
*
* @param \SendinBlue\Client\Model\GetExtendedClientAddress $address address
*
* @return $this
*/
public function setAddress($address)
{
$this->container['address'] = $address;
return $this;
}
/**
* Gets plan
*
* @return \SendinBlue\Client\Model\GetAccountPlan[]
*/
public function getPlan()
{
return $this->container['plan'];
}
/**
* Sets plan
*
* @param \SendinBlue\Client\Model\GetAccountPlan[] $plan Information about your plans and credits
*
* @return $this
*/
public function setPlan($plan)
{
$this->container['plan'] = $plan;
return $this;
}
/**
* Gets relay
*
* @return \SendinBlue\Client\Model\GetAccountRelay
*/
public function getRelay()
{
return $this->container['relay'];
}
/**
* Sets relay
*
* @param \SendinBlue\Client\Model\GetAccountRelay $relay relay
*
* @return $this
*/
public function setRelay($relay)
{
$this->container['relay'] = $relay;
return $this;
}
/**
* Gets marketingAutomation
*
* @return \SendinBlue\Client\Model\GetAccountMarketingAutomation
*/
public function getMarketingAutomation()
{
return $this->container['marketingAutomation'];
}
/**
* Sets marketingAutomation
*
* @param \SendinBlue\Client\Model\GetAccountMarketingAutomation $marketingAutomation marketingAutomation
*
* @return $this
*/
public function setMarketingAutomation($marketingAutomation)
{
$this->container['marketingAutomation'] = $marketingAutomation;
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));
}
}

View File

@ -0,0 +1,279 @@
<?php
/**
* GetAccountMarketingAutomation
*
* 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;
/**
* GetAccountMarketingAutomation Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetAccountMarketingAutomation implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getAccount_marketingAutomation';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['key' => 'string', 'enabled' => 'bool'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['key' => null, 'enabled' => 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 = ['key' => 'key', 'enabled' => 'enabled'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['key' => 'setKey', 'enabled' => 'setEnabled'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['key' => 'getKey', 'enabled' => 'getEnabled'];
/**
* 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['key'] = isset($data['key']) ? $data['key'] : null;
$this->container['enabled'] = isset($data['enabled']) ? $data['enabled'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['enabled'] === null) {
$invalidProperties[] = "'enabled' 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 key
*
* @return string
*/
public function getKey()
{
return $this->container['key'];
}
/**
* Sets key
*
* @param string $key Marketing Automation Tracker ID
*
* @return $this
*/
public function setKey($key)
{
$this->container['key'] = $key;
return $this;
}
/**
* Gets enabled
*
* @return bool
*/
public function getEnabled()
{
return $this->container['enabled'];
}
/**
* Sets enabled
*
* @param bool $enabled Status of Marketing Automation Plateform activation for your account (true=enabled, false=disabled)
*
* @return $this
*/
public function setEnabled($enabled)
{
$this->container['enabled'] = $enabled;
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));
}
}

View File

@ -0,0 +1,413 @@
<?php
/**
* GetAccountPlan
*
* 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;
/**
* GetAccountPlan Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetAccountPlan implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getAccount_plan';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['type' => 'string', 'creditsType' => 'string', 'credits' => 'float', 'startDate' => '\\DateTime', 'endDate' => '\\DateTime', 'userLimit' => 'int'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['type' => null, 'creditsType' => null, 'credits' => 'float', 'startDate' => 'date', 'endDate' => 'date', 'userLimit' => 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', 'creditsType' => 'creditsType', 'credits' => 'credits', 'startDate' => 'startDate', 'endDate' => 'endDate', 'userLimit' => 'userLimit'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['type' => 'setType', 'creditsType' => 'setCreditsType', 'credits' => 'setCredits', 'startDate' => 'setStartDate', 'endDate' => 'setEndDate', 'userLimit' => 'setUserLimit'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['type' => 'getType', 'creditsType' => 'getCreditsType', 'credits' => 'getCredits', 'startDate' => 'getStartDate', 'endDate' => 'getEndDate', 'userLimit' => 'getUserLimit'];
/**
* 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_PAY_AS_YOU_GO = 'payAsYouGo';
const TYPE_FREE = 'free';
const TYPE_SUBSCRIPTION = 'subscription';
const TYPE_SMS = 'sms';
const TYPE_RESELLER = 'reseller';
const CREDITS_TYPE_SEND_LIMIT = 'sendLimit';
/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getTypeAllowableValues()
{
return [self::TYPE_PAY_AS_YOU_GO, self::TYPE_FREE, self::TYPE_SUBSCRIPTION, self::TYPE_SMS, self::TYPE_RESELLER];
}
/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getCreditsTypeAllowableValues()
{
return [self::CREDITS_TYPE_SEND_LIMIT];
}
/**
* 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['creditsType'] = isset($data['creditsType']) ? $data['creditsType'] : null;
$this->container['credits'] = isset($data['credits']) ? $data['credits'] : null;
$this->container['startDate'] = isset($data['startDate']) ? $data['startDate'] : null;
$this->container['endDate'] = isset($data['endDate']) ? $data['endDate'] : null;
$this->container['userLimit'] = isset($data['userLimit']) ? $data['userLimit'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['type'] === null) {
$invalidProperties[] = "'type' can't be null";
}
$allowedValues = $this->getTypeAllowableValues();
if (!\is_null($this->container['type']) && !\in_array($this->container['type'], $allowedValues, \true)) {
$invalidProperties[] = \sprintf("invalid value for 'type', must be one of '%s'", \implode("', '", $allowedValues));
}
if ($this->container['creditsType'] === null) {
$invalidProperties[] = "'creditsType' can't be null";
}
$allowedValues = $this->getCreditsTypeAllowableValues();
if (!\is_null($this->container['creditsType']) && !\in_array($this->container['creditsType'], $allowedValues, \true)) {
$invalidProperties[] = \sprintf("invalid value for 'creditsType', must be one of '%s'", \implode("', '", $allowedValues));
}
if ($this->container['credits'] === null) {
$invalidProperties[] = "'credits' 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 type
*
* @return string
*/
public function getType()
{
return $this->container['type'];
}
/**
* Sets type
*
* @param string $type Displays the plan type of the user
*
* @return $this
*/
public function setType($type)
{
$allowedValues = $this->getTypeAllowableValues();
if (!\in_array($type, $allowedValues, \true)) {
throw new \InvalidArgumentException(\sprintf("Invalid value for 'type', must be one of '%s'", \implode("', '", $allowedValues)));
}
$this->container['type'] = $type;
return $this;
}
/**
* Gets creditsType
*
* @return string
*/
public function getCreditsType()
{
return $this->container['creditsType'];
}
/**
* Sets creditsType
*
* @param string $creditsType This is the type of the credit, \"Send Limit\" is one of the possible types of credit of a user. \"Send Limit\" implies the total number of emails you can send to the subscribers in your account.
*
* @return $this
*/
public function setCreditsType($creditsType)
{
$allowedValues = $this->getCreditsTypeAllowableValues();
if (!\in_array($creditsType, $allowedValues, \true)) {
throw new \InvalidArgumentException(\sprintf("Invalid value for 'creditsType', must be one of '%s'", \implode("', '", $allowedValues)));
}
$this->container['creditsType'] = $creditsType;
return $this;
}
/**
* Gets credits
*
* @return float
*/
public function getCredits()
{
return $this->container['credits'];
}
/**
* Sets credits
*
* @param float $credits Remaining credits of the user
*
* @return $this
*/
public function setCredits($credits)
{
$this->container['credits'] = $credits;
return $this;
}
/**
* Gets startDate
*
* @return \DateTime
*/
public function getStartDate()
{
return $this->container['startDate'];
}
/**
* Sets startDate
*
* @param \DateTime $startDate Date of the period from which the plan will start (only available for \"subscription\" and \"reseller\" plan type)
*
* @return $this
*/
public function setStartDate($startDate)
{
$this->container['startDate'] = $startDate;
return $this;
}
/**
* Gets endDate
*
* @return \DateTime
*/
public function getEndDate()
{
return $this->container['endDate'];
}
/**
* Sets endDate
*
* @param \DateTime $endDate Date of the period from which the plan will end (only available for \"subscription\" and \"reseller\" plan type)
*
* @return $this
*/
public function setEndDate($endDate)
{
$this->container['endDate'] = $endDate;
return $this;
}
/**
* Gets userLimit
*
* @return int
*/
public function getUserLimit()
{
return $this->container['userLimit'];
}
/**
* Sets userLimit
*
* @param int $userLimit Only in case of reseller account. It implies the total number of child accounts you can add to your account.
*
* @return $this
*/
public function setUserLimit($userLimit)
{
$this->container['userLimit'] = $userLimit;
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));
}
}

View File

@ -0,0 +1,283 @@
<?php
/**
* GetAccountRelay
*
* 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;
/**
* GetAccountRelay Class Doc Comment
*
* @category Class
* @description Information about your transactional email account
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetAccountRelay implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getAccount_relay';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['enabled' => 'bool', 'data' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetAccountRelayData'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['enabled' => null, 'data' => 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 = ['enabled' => 'enabled', 'data' => 'data'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['enabled' => 'setEnabled', 'data' => 'setData'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['enabled' => 'getEnabled', 'data' => 'getData'];
/**
* 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['enabled'] = isset($data['enabled']) ? $data['enabled'] : null;
$this->container['data'] = isset($data['data']) ? $data['data'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['enabled'] === null) {
$invalidProperties[] = "'enabled' can't be null";
}
if ($this->container['data'] === null) {
$invalidProperties[] = "'data' 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 enabled
*
* @return bool
*/
public function getEnabled()
{
return $this->container['enabled'];
}
/**
* Sets enabled
*
* @param bool $enabled Status of your transactional email Account (true=Enabled, false=Disabled)
*
* @return $this
*/
public function setEnabled($enabled)
{
$this->container['enabled'] = $enabled;
return $this;
}
/**
* Gets data
*
* @return \SendinBlue\Client\Model\GetAccountRelayData
*/
public function getData()
{
return $this->container['data'];
}
/**
* Sets data
*
* @param \SendinBlue\Client\Model\GetAccountRelayData $data data
*
* @return $this
*/
public function setData($data)
{
$this->container['data'] = $data;
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));
}
}

View File

@ -0,0 +1,308 @@
<?php
/**
* GetAccountRelayData
*
* 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;
/**
* GetAccountRelayData Class Doc Comment
*
* @category Class
* @description Data regarding the transactional email account
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetAccountRelayData implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getAccount_relay_data';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['userName' => 'string', 'relay' => 'string', 'port' => 'int'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['userName' => 'email', 'relay' => null, 'port' => 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 = ['userName' => 'userName', 'relay' => 'relay', 'port' => 'port'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['userName' => 'setUserName', 'relay' => 'setRelay', 'port' => 'setPort'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['userName' => 'getUserName', 'relay' => 'getRelay', 'port' => 'getPort'];
/**
* 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['userName'] = isset($data['userName']) ? $data['userName'] : null;
$this->container['relay'] = isset($data['relay']) ? $data['relay'] : null;
$this->container['port'] = isset($data['port']) ? $data['port'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['userName'] === null) {
$invalidProperties[] = "'userName' can't be null";
}
if ($this->container['relay'] === null) {
$invalidProperties[] = "'relay' can't be null";
}
if ($this->container['port'] === null) {
$invalidProperties[] = "'port' 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 userName
*
* @return string
*/
public function getUserName()
{
return $this->container['userName'];
}
/**
* Sets userName
*
* @param string $userName Email to use as login on transactional platform
*
* @return $this
*/
public function setUserName($userName)
{
$this->container['userName'] = $userName;
return $this;
}
/**
* Gets relay
*
* @return string
*/
public function getRelay()
{
return $this->container['relay'];
}
/**
* Sets relay
*
* @param string $relay URL of the SMTP Relay
*
* @return $this
*/
public function setRelay($relay)
{
$this->container['relay'] = $relay;
return $this;
}
/**
* Gets port
*
* @return int
*/
public function getPort()
{
return $this->container['port'];
}
/**
* Sets port
*
* @param int $port Port used for SMTP Relay
*
* @return $this
*/
public function setPort($port)
{
$this->container['port'] = $port;
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));
}
}

View File

@ -0,0 +1,557 @@
<?php
/**
* GetAggregatedReport
*
* 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;
/**
* GetAggregatedReport Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetAggregatedReport implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getAggregatedReport';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['range' => 'string', 'requests' => 'int', 'delivered' => 'int', 'hardBounces' => 'int', 'softBounces' => 'int', 'clicks' => 'int', 'uniqueClicks' => 'int', 'opens' => 'int', 'uniqueOpens' => 'int', 'spamReports' => 'int', 'blocked' => 'int', 'invalid' => 'int', 'unsubscribed' => 'int'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['range' => null, 'requests' => 'int64', 'delivered' => 'int64', 'hardBounces' => 'int64', 'softBounces' => 'int64', 'clicks' => 'int64', 'uniqueClicks' => 'int64', 'opens' => 'int64', 'uniqueOpens' => 'int64', 'spamReports' => 'int64', 'blocked' => 'int64', 'invalid' => 'int64', 'unsubscribed' => '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 = ['range' => 'range', 'requests' => 'requests', 'delivered' => 'delivered', 'hardBounces' => 'hardBounces', 'softBounces' => 'softBounces', 'clicks' => 'clicks', 'uniqueClicks' => 'uniqueClicks', 'opens' => 'opens', 'uniqueOpens' => 'uniqueOpens', 'spamReports' => 'spamReports', 'blocked' => 'blocked', 'invalid' => 'invalid', 'unsubscribed' => 'unsubscribed'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['range' => 'setRange', 'requests' => 'setRequests', 'delivered' => 'setDelivered', 'hardBounces' => 'setHardBounces', 'softBounces' => 'setSoftBounces', 'clicks' => 'setClicks', 'uniqueClicks' => 'setUniqueClicks', 'opens' => 'setOpens', 'uniqueOpens' => 'setUniqueOpens', 'spamReports' => 'setSpamReports', 'blocked' => 'setBlocked', 'invalid' => 'setInvalid', 'unsubscribed' => 'setUnsubscribed'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['range' => 'getRange', 'requests' => 'getRequests', 'delivered' => 'getDelivered', 'hardBounces' => 'getHardBounces', 'softBounces' => 'getSoftBounces', 'clicks' => 'getClicks', 'uniqueClicks' => 'getUniqueClicks', 'opens' => 'getOpens', 'uniqueOpens' => 'getUniqueOpens', 'spamReports' => 'getSpamReports', 'blocked' => 'getBlocked', 'invalid' => 'getInvalid', 'unsubscribed' => 'getUnsubscribed'];
/**
* 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['range'] = isset($data['range']) ? $data['range'] : null;
$this->container['requests'] = isset($data['requests']) ? $data['requests'] : null;
$this->container['delivered'] = isset($data['delivered']) ? $data['delivered'] : null;
$this->container['hardBounces'] = isset($data['hardBounces']) ? $data['hardBounces'] : null;
$this->container['softBounces'] = isset($data['softBounces']) ? $data['softBounces'] : null;
$this->container['clicks'] = isset($data['clicks']) ? $data['clicks'] : null;
$this->container['uniqueClicks'] = isset($data['uniqueClicks']) ? $data['uniqueClicks'] : null;
$this->container['opens'] = isset($data['opens']) ? $data['opens'] : null;
$this->container['uniqueOpens'] = isset($data['uniqueOpens']) ? $data['uniqueOpens'] : null;
$this->container['spamReports'] = isset($data['spamReports']) ? $data['spamReports'] : null;
$this->container['blocked'] = isset($data['blocked']) ? $data['blocked'] : null;
$this->container['invalid'] = isset($data['invalid']) ? $data['invalid'] : null;
$this->container['unsubscribed'] = isset($data['unsubscribed']) ? $data['unsubscribed'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['range'] === null) {
$invalidProperties[] = "'range' can't be null";
}
if ($this->container['requests'] === null) {
$invalidProperties[] = "'requests' can't be null";
}
if ($this->container['delivered'] === null) {
$invalidProperties[] = "'delivered' can't be null";
}
if ($this->container['hardBounces'] === null) {
$invalidProperties[] = "'hardBounces' can't be null";
}
if ($this->container['softBounces'] === null) {
$invalidProperties[] = "'softBounces' can't be null";
}
if ($this->container['clicks'] === null) {
$invalidProperties[] = "'clicks' can't be null";
}
if ($this->container['uniqueClicks'] === null) {
$invalidProperties[] = "'uniqueClicks' can't be null";
}
if ($this->container['opens'] === null) {
$invalidProperties[] = "'opens' can't be null";
}
if ($this->container['uniqueOpens'] === null) {
$invalidProperties[] = "'uniqueOpens' can't be null";
}
if ($this->container['spamReports'] === null) {
$invalidProperties[] = "'spamReports' can't be null";
}
if ($this->container['blocked'] === null) {
$invalidProperties[] = "'blocked' can't be null";
}
if ($this->container['invalid'] === null) {
$invalidProperties[] = "'invalid' can't be null";
}
if ($this->container['unsubscribed'] === null) {
$invalidProperties[] = "'unsubscribed' can't be null";
}
return $invalidProperties;
}
/**
* 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 range
*
* @return string
*/
public function getRange()
{
return $this->container['range'];
}
/**
* Sets range
*
* @param string $range Time frame of the report
*
* @return $this
*/
public function setRange($range)
{
$this->container['range'] = $range;
return $this;
}
/**
* Gets requests
*
* @return int
*/
public function getRequests()
{
return $this->container['requests'];
}
/**
* Sets requests
*
* @param int $requests Number of requests for the timeframe
*
* @return $this
*/
public function setRequests($requests)
{
$this->container['requests'] = $requests;
return $this;
}
/**
* Gets delivered
*
* @return int
*/
public function getDelivered()
{
return $this->container['delivered'];
}
/**
* Sets delivered
*
* @param int $delivered Number of delivered emails for the timeframe
*
* @return $this
*/
public function setDelivered($delivered)
{
$this->container['delivered'] = $delivered;
return $this;
}
/**
* Gets hardBounces
*
* @return int
*/
public function getHardBounces()
{
return $this->container['hardBounces'];
}
/**
* Sets hardBounces
*
* @param int $hardBounces Number of hardbounces for the timeframe
*
* @return $this
*/
public function setHardBounces($hardBounces)
{
$this->container['hardBounces'] = $hardBounces;
return $this;
}
/**
* Gets softBounces
*
* @return int
*/
public function getSoftBounces()
{
return $this->container['softBounces'];
}
/**
* Sets softBounces
*
* @param int $softBounces Number of softbounces for the timeframe
*
* @return $this
*/
public function setSoftBounces($softBounces)
{
$this->container['softBounces'] = $softBounces;
return $this;
}
/**
* Gets clicks
*
* @return int
*/
public function getClicks()
{
return $this->container['clicks'];
}
/**
* Sets clicks
*
* @param int $clicks Number of clicks for the timeframe
*
* @return $this
*/
public function setClicks($clicks)
{
$this->container['clicks'] = $clicks;
return $this;
}
/**
* Gets uniqueClicks
*
* @return int
*/
public function getUniqueClicks()
{
return $this->container['uniqueClicks'];
}
/**
* Sets uniqueClicks
*
* @param int $uniqueClicks Number of unique clicks for the timeframe
*
* @return $this
*/
public function setUniqueClicks($uniqueClicks)
{
$this->container['uniqueClicks'] = $uniqueClicks;
return $this;
}
/**
* Gets opens
*
* @return int
*/
public function getOpens()
{
return $this->container['opens'];
}
/**
* Sets opens
*
* @param int $opens Number of openings for the timeframe
*
* @return $this
*/
public function setOpens($opens)
{
$this->container['opens'] = $opens;
return $this;
}
/**
* Gets uniqueOpens
*
* @return int
*/
public function getUniqueOpens()
{
return $this->container['uniqueOpens'];
}
/**
* Sets uniqueOpens
*
* @param int $uniqueOpens Number of unique openings for the timeframe
*
* @return $this
*/
public function setUniqueOpens($uniqueOpens)
{
$this->container['uniqueOpens'] = $uniqueOpens;
return $this;
}
/**
* Gets spamReports
*
* @return int
*/
public function getSpamReports()
{
return $this->container['spamReports'];
}
/**
* Sets spamReports
*
* @param int $spamReports Number of complaint (spam report) for the timeframe
*
* @return $this
*/
public function setSpamReports($spamReports)
{
$this->container['spamReports'] = $spamReports;
return $this;
}
/**
* Gets blocked
*
* @return int
*/
public function getBlocked()
{
return $this->container['blocked'];
}
/**
* Sets blocked
*
* @param int $blocked Number of blocked contact emails for the timeframe
*
* @return $this
*/
public function setBlocked($blocked)
{
$this->container['blocked'] = $blocked;
return $this;
}
/**
* Gets invalid
*
* @return int
*/
public function getInvalid()
{
return $this->container['invalid'];
}
/**
* Sets invalid
*
* @param int $invalid Number of invalid emails for the timeframe
*
* @return $this
*/
public function setInvalid($invalid)
{
$this->container['invalid'] = $invalid;
return $this;
}
/**
* Gets unsubscribed
*
* @return int
*/
public function getUnsubscribed()
{
return $this->container['unsubscribed'];
}
/**
* Sets unsubscribed
*
* @param int $unsubscribed Number of unsubscribed emails for the timeframe
*
* @return $this
*/
public function setUnsubscribed($unsubscribed)
{
$this->container['unsubscribed'] = $unsubscribed;
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));
}
}

View File

@ -0,0 +1,257 @@
<?php
/**
* GetAttributes
*
* 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;
/**
* GetAttributes Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetAttributes implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getAttributes';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['attributes' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetAttributesAttributes[]'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['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 = ['attributes' => 'attributes'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['attributes' => 'setAttributes'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['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['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['attributes'] === null) {
$invalidProperties[] = "'attributes' 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 attributes
*
* @return \SendinBlue\Client\Model\GetAttributesAttributes[]
*/
public function getAttributes()
{
return $this->container['attributes'];
}
/**
* Sets attributes
*
* @param \SendinBlue\Client\Model\GetAttributesAttributes[] $attributes Listing of available contact attributes in your account
*
* @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
*/
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));
}
}

View File

@ -0,0 +1,392 @@
<?php
/**
* GetAttributesAttributes
*
* 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;
/**
* GetAttributesAttributes Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetAttributesAttributes implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getAttributes_attributes';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['name' => 'string', 'category' => 'string', 'type' => 'string', 'enumeration' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetAttributesEnumeration[]', 'calculatedValue' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['name' => null, 'category' => null, 'type' => null, 'enumeration' => null, 'calculatedValue' => 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', 'category' => 'category', 'type' => 'type', 'enumeration' => 'enumeration', 'calculatedValue' => 'calculatedValue'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['name' => 'setName', 'category' => 'setCategory', 'type' => 'setType', 'enumeration' => 'setEnumeration', 'calculatedValue' => 'setCalculatedValue'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['name' => 'getName', 'category' => 'getCategory', 'type' => 'getType', 'enumeration' => 'getEnumeration', 'calculatedValue' => 'getCalculatedValue'];
/**
* 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 CATEGORY_NORMAL = 'normal';
const CATEGORY_TRANSACTIONAL = 'transactional';
const CATEGORY_CATEGORY = 'category';
const CATEGORY_CALCULATED = 'calculated';
const CATEGORY__GLOBAL = 'global';
const TYPE_TEXT = 'text';
const TYPE_DATE = 'date';
const TYPE_FLOAT = 'float';
const TYPE_ID = 'id';
const TYPE_BOOLEAN = 'boolean';
/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getCategoryAllowableValues()
{
return [self::CATEGORY_NORMAL, self::CATEGORY_TRANSACTIONAL, self::CATEGORY_CATEGORY, self::CATEGORY_CALCULATED, self::CATEGORY__GLOBAL];
}
/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getTypeAllowableValues()
{
return [self::TYPE_TEXT, self::TYPE_DATE, self::TYPE_FLOAT, self::TYPE_ID, self::TYPE_BOOLEAN];
}
/**
* 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['category'] = isset($data['category']) ? $data['category'] : null;
$this->container['type'] = isset($data['type']) ? $data['type'] : null;
$this->container['enumeration'] = isset($data['enumeration']) ? $data['enumeration'] : null;
$this->container['calculatedValue'] = isset($data['calculatedValue']) ? $data['calculatedValue'] : null;
}
/**
* 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['category'] === null) {
$invalidProperties[] = "'category' can't be null";
}
$allowedValues = $this->getCategoryAllowableValues();
if (!\is_null($this->container['category']) && !\in_array($this->container['category'], $allowedValues, \true)) {
$invalidProperties[] = \sprintf("invalid value for 'category', must be one of '%s'", \implode("', '", $allowedValues));
}
$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 name
*
* @return string
*/
public function getName()
{
return $this->container['name'];
}
/**
* Sets name
*
* @param string $name Name of the attribute
*
* @return $this
*/
public function setName($name)
{
$this->container['name'] = $name;
return $this;
}
/**
* Gets category
*
* @return string
*/
public function getCategory()
{
return $this->container['category'];
}
/**
* Sets category
*
* @param string $category Category of the attribute
*
* @return $this
*/
public function setCategory($category)
{
$allowedValues = $this->getCategoryAllowableValues();
if (!\in_array($category, $allowedValues, \true)) {
throw new \InvalidArgumentException(\sprintf("Invalid value for 'category', must be one of '%s'", \implode("', '", $allowedValues)));
}
$this->container['category'] = $category;
return $this;
}
/**
* Gets type
*
* @return string
*/
public function getType()
{
return $this->container['type'];
}
/**
* Sets type
*
* @param string $type Type of the 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;
}
/**
* Gets enumeration
*
* @return \SendinBlue\Client\Model\GetAttributesEnumeration[]
*/
public function getEnumeration()
{
return $this->container['enumeration'];
}
/**
* Sets enumeration
*
* @param \SendinBlue\Client\Model\GetAttributesEnumeration[] $enumeration Parameter only available for \"category\" type attributes.
*
* @return $this
*/
public function setEnumeration($enumeration)
{
$this->container['enumeration'] = $enumeration;
return $this;
}
/**
* Gets calculatedValue
*
* @return string
*/
public function getCalculatedValue()
{
return $this->container['calculatedValue'];
}
/**
* Sets calculatedValue
*
* @param string $calculatedValue Calculated value formula
*
* @return $this
*/
public function setCalculatedValue($calculatedValue)
{
$this->container['calculatedValue'] = $calculatedValue;
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));
}
}

View File

@ -0,0 +1,282 @@
<?php
/**
* GetAttributesEnumeration
*
* 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;
/**
* GetAttributesEnumeration Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetAttributesEnumeration implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getAttributes_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' => 'int64', '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 Value of the \"category\" type attribute
*
* @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 \"category\" type attribute
*
* @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
*/
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));
}
}

View File

@ -0,0 +1,572 @@
<?php
/**
* GetCampaignOverview
*
* 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;
/**
* GetCampaignOverview Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetCampaignOverview implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getCampaignOverview';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['id' => 'int', 'name' => 'string', 'subject' => 'string', 'type' => 'string', 'status' => 'string', 'scheduledAt' => '\\DateTime', 'abTesting' => 'bool', 'subjectA' => 'string', 'subjectB' => 'string', 'splitRule' => 'int', 'winnerCriteria' => 'string', 'winnerDelay' => 'int', 'sendAtBestTime' => 'bool'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['id' => 'int64', 'name' => null, 'subject' => null, 'type' => null, 'status' => null, 'scheduledAt' => 'date-time', 'abTesting' => null, 'subjectA' => null, 'subjectB' => null, 'splitRule' => null, 'winnerCriteria' => null, 'winnerDelay' => null, 'sendAtBestTime' => 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', 'subject' => 'subject', 'type' => 'type', 'status' => 'status', 'scheduledAt' => 'scheduledAt', 'abTesting' => 'abTesting', 'subjectA' => 'subjectA', 'subjectB' => 'subjectB', 'splitRule' => 'splitRule', 'winnerCriteria' => 'winnerCriteria', 'winnerDelay' => 'winnerDelay', 'sendAtBestTime' => 'sendAtBestTime'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['id' => 'setId', 'name' => 'setName', 'subject' => 'setSubject', 'type' => 'setType', 'status' => 'setStatus', 'scheduledAt' => 'setScheduledAt', 'abTesting' => 'setAbTesting', 'subjectA' => 'setSubjectA', 'subjectB' => 'setSubjectB', 'splitRule' => 'setSplitRule', 'winnerCriteria' => 'setWinnerCriteria', 'winnerDelay' => 'setWinnerDelay', 'sendAtBestTime' => 'setSendAtBestTime'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['id' => 'getId', 'name' => 'getName', 'subject' => 'getSubject', 'type' => 'getType', 'status' => 'getStatus', 'scheduledAt' => 'getScheduledAt', 'abTesting' => 'getAbTesting', 'subjectA' => 'getSubjectA', 'subjectB' => 'getSubjectB', 'splitRule' => 'getSplitRule', 'winnerCriteria' => 'getWinnerCriteria', 'winnerDelay' => 'getWinnerDelay', 'sendAtBestTime' => 'getSendAtBestTime'];
/**
* 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_CLASSIC = 'classic';
const TYPE_TRIGGER = 'trigger';
const STATUS_DRAFT = 'draft';
const STATUS_SENT = 'sent';
const STATUS_ARCHIVE = 'archive';
const STATUS_QUEUED = 'queued';
const STATUS_SUSPENDED = 'suspended';
const STATUS_IN_PROCESS = 'in_process';
/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getTypeAllowableValues()
{
return [self::TYPE_CLASSIC, self::TYPE_TRIGGER];
}
/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getStatusAllowableValues()
{
return [self::STATUS_DRAFT, self::STATUS_SENT, self::STATUS_ARCHIVE, self::STATUS_QUEUED, self::STATUS_SUSPENDED, self::STATUS_IN_PROCESS];
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @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['subject'] = isset($data['subject']) ? $data['subject'] : null;
$this->container['type'] = isset($data['type']) ? $data['type'] : null;
$this->container['status'] = isset($data['status']) ? $data['status'] : null;
$this->container['scheduledAt'] = isset($data['scheduledAt']) ? $data['scheduledAt'] : null;
$this->container['abTesting'] = isset($data['abTesting']) ? $data['abTesting'] : null;
$this->container['subjectA'] = isset($data['subjectA']) ? $data['subjectA'] : null;
$this->container['subjectB'] = isset($data['subjectB']) ? $data['subjectB'] : null;
$this->container['splitRule'] = isset($data['splitRule']) ? $data['splitRule'] : null;
$this->container['winnerCriteria'] = isset($data['winnerCriteria']) ? $data['winnerCriteria'] : null;
$this->container['winnerDelay'] = isset($data['winnerDelay']) ? $data['winnerDelay'] : null;
$this->container['sendAtBestTime'] = isset($data['sendAtBestTime']) ? $data['sendAtBestTime'] : null;
}
/**
* 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";
}
if ($this->container['type'] === null) {
$invalidProperties[] = "'type' can't be null";
}
$allowedValues = $this->getTypeAllowableValues();
if (!\is_null($this->container['type']) && !\in_array($this->container['type'], $allowedValues, \true)) {
$invalidProperties[] = \sprintf("invalid value for 'type', must be one of '%s'", \implode("', '", $allowedValues));
}
if ($this->container['status'] === null) {
$invalidProperties[] = "'status' can't be null";
}
$allowedValues = $this->getStatusAllowableValues();
if (!\is_null($this->container['status']) && !\in_array($this->container['status'], $allowedValues, \true)) {
$invalidProperties[] = \sprintf("invalid value for 'status', must be one of '%s'", \implode("', '", $allowedValues));
}
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 campaign
*
* @return $this
*/
public function setId($id)
{
$this->container['id'] = $id;
return $this;
}
/**
* Gets name
*
* @return string
*/
public function getName()
{
return $this->container['name'];
}
/**
* Sets name
*
* @param string $name Name of the campaign
*
* @return $this
*/
public function setName($name)
{
$this->container['name'] = $name;
return $this;
}
/**
* Gets subject
*
* @return string
*/
public function getSubject()
{
return $this->container['subject'];
}
/**
* Sets subject
*
* @param string $subject Subject of the campaign. Only available if `abTesting` flag of the campaign is `false`
*
* @return $this
*/
public function setSubject($subject)
{
$this->container['subject'] = $subject;
return $this;
}
/**
* Gets type
*
* @return string
*/
public function getType()
{
return $this->container['type'];
}
/**
* Sets type
*
* @param string $type Type of campaign
*
* @return $this
*/
public function setType($type)
{
$allowedValues = $this->getTypeAllowableValues();
if (!\in_array($type, $allowedValues, \true)) {
throw new \InvalidArgumentException(\sprintf("Invalid value for 'type', must be one of '%s'", \implode("', '", $allowedValues)));
}
$this->container['type'] = $type;
return $this;
}
/**
* Gets status
*
* @return string
*/
public function getStatus()
{
return $this->container['status'];
}
/**
* Sets status
*
* @param string $status Status of the campaign
*
* @return $this
*/
public function setStatus($status)
{
$allowedValues = $this->getStatusAllowableValues();
if (!\in_array($status, $allowedValues, \true)) {
throw new \InvalidArgumentException(\sprintf("Invalid value for 'status', must be one of '%s'", \implode("', '", $allowedValues)));
}
$this->container['status'] = $status;
return $this;
}
/**
* Gets scheduledAt
*
* @return \DateTime
*/
public function getScheduledAt()
{
return $this->container['scheduledAt'];
}
/**
* Sets scheduledAt
*
* @param \DateTime $scheduledAt UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ)
*
* @return $this
*/
public function setScheduledAt($scheduledAt)
{
$this->container['scheduledAt'] = $scheduledAt;
return $this;
}
/**
* Gets abTesting
*
* @return bool
*/
public function getAbTesting()
{
return $this->container['abTesting'];
}
/**
* Sets abTesting
*
* @param bool $abTesting Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled.
*
* @return $this
*/
public function setAbTesting($abTesting)
{
$this->container['abTesting'] = $abTesting;
return $this;
}
/**
* Gets subjectA
*
* @return string
*/
public function getSubjectA()
{
return $this->container['subjectA'];
}
/**
* Sets subjectA
*
* @param string $subjectA Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true`
*
* @return $this
*/
public function setSubjectA($subjectA)
{
$this->container['subjectA'] = $subjectA;
return $this;
}
/**
* Gets subjectB
*
* @return string
*/
public function getSubjectB()
{
return $this->container['subjectB'];
}
/**
* Sets subjectB
*
* @param string $subjectB Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true`
*
* @return $this
*/
public function setSubjectB($subjectB)
{
$this->container['subjectB'] = $subjectB;
return $this;
}
/**
* Gets splitRule
*
* @return int
*/
public function getSplitRule()
{
return $this->container['splitRule'];
}
/**
* Sets splitRule
*
* @param int $splitRule The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true`
*
* @return $this
*/
public function setSplitRule($splitRule)
{
$this->container['splitRule'] = $splitRule;
return $this;
}
/**
* Gets winnerCriteria
*
* @return string
*/
public function getWinnerCriteria()
{
return $this->container['winnerCriteria'];
}
/**
* Sets winnerCriteria
*
* @param string $winnerCriteria Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true`
*
* @return $this
*/
public function setWinnerCriteria($winnerCriteria)
{
$this->container['winnerCriteria'] = $winnerCriteria;
return $this;
}
/**
* Gets winnerDelay
*
* @return int
*/
public function getWinnerDelay()
{
return $this->container['winnerDelay'];
}
/**
* Sets winnerDelay
*
* @param int $winnerDelay The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true`
*
* @return $this
*/
public function setWinnerDelay($winnerDelay)
{
$this->container['winnerDelay'] = $winnerDelay;
return $this;
}
/**
* Gets sendAtBestTime
*
* @return bool
*/
public function getSendAtBestTime()
{
return $this->container['sendAtBestTime'];
}
/**
* Sets sendAtBestTime
*
* @param bool $sendAtBestTime It is true if you have chosen to send your campaign at best time, otherwise it is false
*
* @return $this
*/
public function setSendAtBestTime($sendAtBestTime)
{
$this->container['sendAtBestTime'] = $sendAtBestTime;
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));
}
}

View File

@ -0,0 +1,282 @@
<?php
/**
* GetCampaignRecipients
*
* 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;
/**
* GetCampaignRecipients Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetCampaignRecipients implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getCampaignRecipients';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['lists' => 'int[]', 'exclusionLists' => 'int[]'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['lists' => 'int64', 'exclusionLists' => '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 = ['lists' => 'lists', 'exclusionLists' => 'exclusionLists'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['lists' => 'setLists', 'exclusionLists' => 'setExclusionLists'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['lists' => 'getLists', 'exclusionLists' => 'getExclusionLists'];
/**
* 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['lists'] = isset($data['lists']) ? $data['lists'] : null;
$this->container['exclusionLists'] = isset($data['exclusionLists']) ? $data['exclusionLists'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['lists'] === null) {
$invalidProperties[] = "'lists' can't be null";
}
if ($this->container['exclusionLists'] === null) {
$invalidProperties[] = "'exclusionLists' 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 lists
*
* @return int[]
*/
public function getLists()
{
return $this->container['lists'];
}
/**
* Sets lists
*
* @param int[] $lists lists
*
* @return $this
*/
public function setLists($lists)
{
$this->container['lists'] = $lists;
return $this;
}
/**
* Gets exclusionLists
*
* @return int[]
*/
public function getExclusionLists()
{
return $this->container['exclusionLists'];
}
/**
* Sets exclusionLists
*
* @param int[] $exclusionLists exclusionLists
*
* @return $this
*/
public function setExclusionLists($exclusionLists)
{
$this->container['exclusionLists'] = $exclusionLists;
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));
}
}

View File

@ -0,0 +1,526 @@
<?php
/**
* GetCampaignStats
*
* 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;
/**
* GetCampaignStats Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetCampaignStats implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getCampaignStats';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['listId' => 'int', 'uniqueClicks' => 'int', 'clickers' => 'int', 'complaints' => 'int', 'delivered' => 'int', 'sent' => 'int', 'softBounces' => 'int', 'hardBounces' => 'int', 'uniqueViews' => 'int', 'unsubscriptions' => 'int', 'viewed' => 'int', 'deferred' => 'int'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['listId' => 'int64', 'uniqueClicks' => 'int64', 'clickers' => 'int64', 'complaints' => 'int64', 'delivered' => 'int64', 'sent' => 'int64', 'softBounces' => 'int64', 'hardBounces' => 'int64', 'uniqueViews' => 'int64', 'unsubscriptions' => 'int64', 'viewed' => 'int64', 'deferred' => '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 = ['listId' => 'listId', 'uniqueClicks' => 'uniqueClicks', 'clickers' => 'clickers', 'complaints' => 'complaints', 'delivered' => 'delivered', 'sent' => 'sent', 'softBounces' => 'softBounces', 'hardBounces' => 'hardBounces', 'uniqueViews' => 'uniqueViews', 'unsubscriptions' => 'unsubscriptions', 'viewed' => 'viewed', 'deferred' => 'deferred'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['listId' => 'setListId', 'uniqueClicks' => 'setUniqueClicks', 'clickers' => 'setClickers', 'complaints' => 'setComplaints', 'delivered' => 'setDelivered', 'sent' => 'setSent', 'softBounces' => 'setSoftBounces', 'hardBounces' => 'setHardBounces', 'uniqueViews' => 'setUniqueViews', 'unsubscriptions' => 'setUnsubscriptions', 'viewed' => 'setViewed', 'deferred' => 'setDeferred'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['listId' => 'getListId', 'uniqueClicks' => 'getUniqueClicks', 'clickers' => 'getClickers', 'complaints' => 'getComplaints', 'delivered' => 'getDelivered', 'sent' => 'getSent', 'softBounces' => 'getSoftBounces', 'hardBounces' => 'getHardBounces', 'uniqueViews' => 'getUniqueViews', 'unsubscriptions' => 'getUnsubscriptions', 'viewed' => 'getViewed', 'deferred' => 'getDeferred'];
/**
* 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['listId'] = isset($data['listId']) ? $data['listId'] : null;
$this->container['uniqueClicks'] = isset($data['uniqueClicks']) ? $data['uniqueClicks'] : null;
$this->container['clickers'] = isset($data['clickers']) ? $data['clickers'] : null;
$this->container['complaints'] = isset($data['complaints']) ? $data['complaints'] : null;
$this->container['delivered'] = isset($data['delivered']) ? $data['delivered'] : null;
$this->container['sent'] = isset($data['sent']) ? $data['sent'] : null;
$this->container['softBounces'] = isset($data['softBounces']) ? $data['softBounces'] : null;
$this->container['hardBounces'] = isset($data['hardBounces']) ? $data['hardBounces'] : null;
$this->container['uniqueViews'] = isset($data['uniqueViews']) ? $data['uniqueViews'] : null;
$this->container['unsubscriptions'] = isset($data['unsubscriptions']) ? $data['unsubscriptions'] : null;
$this->container['viewed'] = isset($data['viewed']) ? $data['viewed'] : null;
$this->container['deferred'] = isset($data['deferred']) ? $data['deferred'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['uniqueClicks'] === null) {
$invalidProperties[] = "'uniqueClicks' can't be null";
}
if ($this->container['clickers'] === null) {
$invalidProperties[] = "'clickers' can't be null";
}
if ($this->container['complaints'] === null) {
$invalidProperties[] = "'complaints' can't be null";
}
if ($this->container['delivered'] === null) {
$invalidProperties[] = "'delivered' can't be null";
}
if ($this->container['sent'] === null) {
$invalidProperties[] = "'sent' can't be null";
}
if ($this->container['softBounces'] === null) {
$invalidProperties[] = "'softBounces' can't be null";
}
if ($this->container['hardBounces'] === null) {
$invalidProperties[] = "'hardBounces' can't be null";
}
if ($this->container['uniqueViews'] === null) {
$invalidProperties[] = "'uniqueViews' can't be null";
}
if ($this->container['unsubscriptions'] === null) {
$invalidProperties[] = "'unsubscriptions' can't be null";
}
if ($this->container['viewed'] === null) {
$invalidProperties[] = "'viewed' 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 listId
*
* @return int
*/
public function getListId()
{
return $this->container['listId'];
}
/**
* Sets listId
*
* @param int $listId List Id of email campaign (only in case of get email campaign(s)(not for global stats))
*
* @return $this
*/
public function setListId($listId)
{
$this->container['listId'] = $listId;
return $this;
}
/**
* Gets uniqueClicks
*
* @return int
*/
public function getUniqueClicks()
{
return $this->container['uniqueClicks'];
}
/**
* Sets uniqueClicks
*
* @param int $uniqueClicks Number of unique clicks for the campaign
*
* @return $this
*/
public function setUniqueClicks($uniqueClicks)
{
$this->container['uniqueClicks'] = $uniqueClicks;
return $this;
}
/**
* Gets clickers
*
* @return int
*/
public function getClickers()
{
return $this->container['clickers'];
}
/**
* Sets clickers
*
* @param int $clickers Number of total clicks for the campaign
*
* @return $this
*/
public function setClickers($clickers)
{
$this->container['clickers'] = $clickers;
return $this;
}
/**
* Gets complaints
*
* @return int
*/
public function getComplaints()
{
return $this->container['complaints'];
}
/**
* Sets complaints
*
* @param int $complaints Number of complaints (Spam reports) for the campaign
*
* @return $this
*/
public function setComplaints($complaints)
{
$this->container['complaints'] = $complaints;
return $this;
}
/**
* Gets delivered
*
* @return int
*/
public function getDelivered()
{
return $this->container['delivered'];
}
/**
* Sets delivered
*
* @param int $delivered Number of delivered emails for the campaign
*
* @return $this
*/
public function setDelivered($delivered)
{
$this->container['delivered'] = $delivered;
return $this;
}
/**
* Gets sent
*
* @return int
*/
public function getSent()
{
return $this->container['sent'];
}
/**
* Sets sent
*
* @param int $sent Number of sent emails for the campaign
*
* @return $this
*/
public function setSent($sent)
{
$this->container['sent'] = $sent;
return $this;
}
/**
* Gets softBounces
*
* @return int
*/
public function getSoftBounces()
{
return $this->container['softBounces'];
}
/**
* Sets softBounces
*
* @param int $softBounces Number of softbounce for the campaign
*
* @return $this
*/
public function setSoftBounces($softBounces)
{
$this->container['softBounces'] = $softBounces;
return $this;
}
/**
* Gets hardBounces
*
* @return int
*/
public function getHardBounces()
{
return $this->container['hardBounces'];
}
/**
* Sets hardBounces
*
* @param int $hardBounces Number of harbounce for the campaign
*
* @return $this
*/
public function setHardBounces($hardBounces)
{
$this->container['hardBounces'] = $hardBounces;
return $this;
}
/**
* Gets uniqueViews
*
* @return int
*/
public function getUniqueViews()
{
return $this->container['uniqueViews'];
}
/**
* Sets uniqueViews
*
* @param int $uniqueViews Number of unique openings for the campaign
*
* @return $this
*/
public function setUniqueViews($uniqueViews)
{
$this->container['uniqueViews'] = $uniqueViews;
return $this;
}
/**
* Gets unsubscriptions
*
* @return int
*/
public function getUnsubscriptions()
{
return $this->container['unsubscriptions'];
}
/**
* Sets unsubscriptions
*
* @param int $unsubscriptions Number of unsubscription for the campaign
*
* @return $this
*/
public function setUnsubscriptions($unsubscriptions)
{
$this->container['unsubscriptions'] = $unsubscriptions;
return $this;
}
/**
* Gets viewed
*
* @return int
*/
public function getViewed()
{
return $this->container['viewed'];
}
/**
* Sets viewed
*
* @param int $viewed Number of openings for the campaign
*
* @return $this
*/
public function setViewed($viewed)
{
$this->container['viewed'] = $viewed;
return $this;
}
/**
* Gets deferred
*
* @return int
*/
public function getDeferred()
{
return $this->container['deferred'];
}
/**
* Sets deferred
*
* @param int $deferred Number of deferred emails for the campaign
*
* @return $this
*/
public function setDeferred($deferred)
{
$this->container['deferred'] = $deferred;
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));
}
}

View File

@ -0,0 +1,257 @@
<?php
/**
* GetChildAccountCreationStatus
*
* 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;
/**
* GetChildAccountCreationStatus Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetChildAccountCreationStatus implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getChildAccountCreationStatus';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['childAccountCreated' => 'bool'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['childAccountCreated' => 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 = ['childAccountCreated' => 'childAccountCreated'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['childAccountCreated' => 'setChildAccountCreated'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['childAccountCreated' => 'getChildAccountCreated'];
/**
* 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['childAccountCreated'] = isset($data['childAccountCreated']) ? $data['childAccountCreated'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['childAccountCreated'] === null) {
$invalidProperties[] = "'childAccountCreated' 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 childAccountCreated
*
* @return bool
*/
public function getChildAccountCreated()
{
return $this->container['childAccountCreated'];
}
/**
* Sets childAccountCreated
*
* @param bool $childAccountCreated Status of child account creation whether it is successfully created (exists) or not.
*
* @return $this
*/
public function setChildAccountCreated($childAccountCreated)
{
$this->container['childAccountCreated'] = $childAccountCreated;
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));
}
}

View File

@ -0,0 +1,282 @@
<?php
/**
* GetChildDomain
*
* 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;
/**
* GetChildDomain Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetChildDomain implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getChildDomain';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['domain' => 'string', 'active' => 'bool'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['domain' => null, 'active' => 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', 'active' => 'active'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['domain' => 'setDomain', 'active' => 'setActive'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['domain' => 'getDomain', 'active' => 'getActive'];
/**
* 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;
$this->container['active'] = isset($data['active']) ? $data['active'] : 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";
}
if ($this->container['active'] === null) {
$invalidProperties[] = "'active' 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 Sender domain
*
* @return $this
*/
public function setDomain($domain)
{
$this->container['domain'] = $domain;
return $this;
}
/**
* Gets active
*
* @return bool
*/
public function getActive()
{
return $this->container['active'];
}
/**
* Sets active
*
* @param bool $active indicates whether a domain is verified or not
*
* @return $this
*/
public function setActive($active)
{
$this->container['active'] = $active;
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));
}
}

View File

@ -0,0 +1,232 @@
<?php
/**
* GetChildDomains
*
* 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;
/**
* GetChildDomains Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetChildDomains implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getChildDomains';
/**
* 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 = parent::listInvalidProperties();
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
*/
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));
}
}

View File

@ -0,0 +1,445 @@
<?php
/**
* GetChildInfo
*
* 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;
/**
* GetChildInfo Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetChildInfo implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getChildInfo';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['email' => 'string', 'firstName' => 'string', 'lastName' => 'string', 'companyName' => 'string', 'credits' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetChildInfoCredits', 'statistics' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetChildInfoStatistics', 'password' => 'string', 'ips' => 'string[]', 'apiKeys' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetChildInfoApiKeys'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['email' => 'email', 'firstName' => null, 'lastName' => null, 'companyName' => null, 'credits' => null, 'statistics' => null, 'password' => 'password', 'ips' => null, 'apiKeys' => 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', 'credits' => 'credits', 'statistics' => 'statistics', 'password' => 'password', 'ips' => 'ips', 'apiKeys' => 'apiKeys'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['email' => 'setEmail', 'firstName' => 'setFirstName', 'lastName' => 'setLastName', 'companyName' => 'setCompanyName', 'credits' => 'setCredits', 'statistics' => 'setStatistics', 'password' => 'setPassword', 'ips' => 'setIps', 'apiKeys' => 'setApiKeys'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['email' => 'getEmail', 'firstName' => 'getFirstName', 'lastName' => 'getLastName', 'companyName' => 'getCompanyName', 'credits' => 'getCredits', 'statistics' => 'getStatistics', 'password' => 'getPassword', 'ips' => 'getIps', 'apiKeys' => 'getApiKeys'];
/**
* 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['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['credits'] = isset($data['credits']) ? $data['credits'] : null;
$this->container['statistics'] = isset($data['statistics']) ? $data['statistics'] : null;
$this->container['password'] = isset($data['password']) ? $data['password'] : null;
$this->container['ips'] = isset($data['ips']) ? $data['ips'] : null;
$this->container['apiKeys'] = isset($data['apiKeys']) ? $data['apiKeys'] : null;
}
/**
* 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";
}
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 Login Email
*
* @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
*
* @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
*
* @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 Name of the company
*
* @return $this
*/
public function setCompanyName($companyName)
{
$this->container['companyName'] = $companyName;
return $this;
}
/**
* Gets credits
*
* @return \SendinBlue\Client\Model\GetChildInfoCredits
*/
public function getCredits()
{
return $this->container['credits'];
}
/**
* Sets credits
*
* @param \SendinBlue\Client\Model\GetChildInfoCredits $credits credits
*
* @return $this
*/
public function setCredits($credits)
{
$this->container['credits'] = $credits;
return $this;
}
/**
* Gets statistics
*
* @return \SendinBlue\Client\Model\GetChildInfoStatistics
*/
public function getStatistics()
{
return $this->container['statistics'];
}
/**
* Sets statistics
*
* @param \SendinBlue\Client\Model\GetChildInfoStatistics $statistics statistics
*
* @return $this
*/
public function setStatistics($statistics)
{
$this->container['statistics'] = $statistics;
return $this;
}
/**
* Gets password
*
* @return string
*/
public function getPassword()
{
return $this->container['password'];
}
/**
* Sets password
*
* @param string $password The encrypted password of child account
*
* @return $this
*/
public function setPassword($password)
{
$this->container['password'] = $password;
return $this;
}
/**
* Gets ips
*
* @return string[]
*/
public function getIps()
{
return $this->container['ips'];
}
/**
* Sets ips
*
* @param string[] $ips IP(s) associated to a child account user
*
* @return $this
*/
public function setIps($ips)
{
$this->container['ips'] = $ips;
return $this;
}
/**
* Gets apiKeys
*
* @return \SendinBlue\Client\Model\GetChildInfoApiKeys
*/
public function getApiKeys()
{
return $this->container['apiKeys'];
}
/**
* Sets apiKeys
*
* @param \SendinBlue\Client\Model\GetChildInfoApiKeys $apiKeys apiKeys
*
* @return $this
*/
public function setApiKeys($apiKeys)
{
$this->container['apiKeys'] = $apiKeys;
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));
}
}

View File

@ -0,0 +1,280 @@
<?php
/**
* GetChildInfoApiKeys
*
* 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;
/**
* GetChildInfoApiKeys Class Doc Comment
*
* @category Class
* @description API Keys associated to child account
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetChildInfoApiKeys implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getChildInfo_apiKeys';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['v2' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetChildInfoApiKeysV2[]', 'v3' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetChildInfoApiKeysV3[]'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['v2' => null, 'v3' => 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 = ['v2' => 'v2', 'v3' => 'v3'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['v2' => 'setV2', 'v3' => 'setV3'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['v2' => 'getV2', 'v3' => 'getV3'];
/**
* 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['v2'] = isset($data['v2']) ? $data['v2'] : null;
$this->container['v3'] = isset($data['v3']) ? $data['v3'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['v2'] === null) {
$invalidProperties[] = "'v2' 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 v2
*
* @return \SendinBlue\Client\Model\GetChildInfoApiKeysV2[]
*/
public function getV2()
{
return $this->container['v2'];
}
/**
* Sets v2
*
* @param \SendinBlue\Client\Model\GetChildInfoApiKeysV2[] $v2 v2
*
* @return $this
*/
public function setV2($v2)
{
$this->container['v2'] = $v2;
return $this;
}
/**
* Gets v3
*
* @return \SendinBlue\Client\Model\GetChildInfoApiKeysV3[]
*/
public function getV3()
{
return $this->container['v3'];
}
/**
* Sets v3
*
* @param \SendinBlue\Client\Model\GetChildInfoApiKeysV3[] $v3 v3
*
* @return $this
*/
public function setV3($v3)
{
$this->container['v3'] = $v3;
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));
}
}

View File

@ -0,0 +1,282 @@
<?php
/**
* GetChildInfoApiKeysV2
*
* 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;
/**
* GetChildInfoApiKeysV2 Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetChildInfoApiKeysV2 implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getChildInfo_apiKeys_v2';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['name' => 'string', 'key' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['name' => 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 = ['name' => 'name', 'key' => 'key'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['name' => 'setName', 'key' => 'setKey'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['name' => 'getName', '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['name'] = isset($data['name']) ? $data['name'] : 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 = [];
if ($this->container['name'] === null) {
$invalidProperties[] = "'name' can't be null";
}
if ($this->container['key'] === null) {
$invalidProperties[] = "'key' 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 key for version 2
*
* @return $this
*/
public function setName($name)
{
$this->container['name'] = $name;
return $this;
}
/**
* Gets key
*
* @return string
*/
public function getKey()
{
return $this->container['key'];
}
/**
* Sets key
*
* @param string $key API Key for version 2
*
* @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
*/
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));
}
}

View File

@ -0,0 +1,282 @@
<?php
/**
* GetChildInfoApiKeysV3
*
* 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;
/**
* GetChildInfoApiKeysV3 Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetChildInfoApiKeysV3 implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getChildInfo_apiKeys_v3';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['name' => 'string', 'key' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['name' => 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 = ['name' => 'name', 'key' => 'key'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['name' => 'setName', 'key' => 'setKey'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['name' => 'getName', '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['name'] = isset($data['name']) ? $data['name'] : 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 = [];
if ($this->container['name'] === null) {
$invalidProperties[] = "'name' can't be null";
}
if ($this->container['key'] === null) {
$invalidProperties[] = "'key' 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 key for version 3
*
* @return $this
*/
public function setName($name)
{
$this->container['name'] = $name;
return $this;
}
/**
* Gets key
*
* @return string
*/
public function getKey()
{
return $this->container['key'];
}
/**
* Sets key
*
* @param string $key API Key for version 3
*
* @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
*/
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));
}
}

View File

@ -0,0 +1,277 @@
<?php
/**
* GetChildInfoCredits
*
* 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;
/**
* GetChildInfoCredits Class Doc Comment
*
* @category Class
* @description Credits available for your child
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetChildInfoCredits implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getChildInfo_credits';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['emailCredits' => 'int', 'smsCredits' => 'int'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['emailCredits' => 'int64', 'smsCredits' => '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 = ['emailCredits' => 'emailCredits', 'smsCredits' => 'smsCredits'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['emailCredits' => 'setEmailCredits', 'smsCredits' => 'setSmsCredits'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['emailCredits' => 'getEmailCredits', 'smsCredits' => 'getSmsCredits'];
/**
* 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['emailCredits'] = isset($data['emailCredits']) ? $data['emailCredits'] : null;
$this->container['smsCredits'] = isset($data['smsCredits']) ? $data['smsCredits'] : 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 emailCredits
*
* @return int
*/
public function getEmailCredits()
{
return $this->container['emailCredits'];
}
/**
* Sets emailCredits
*
* @param int $emailCredits Email credits available for your child
*
* @return $this
*/
public function setEmailCredits($emailCredits)
{
$this->container['emailCredits'] = $emailCredits;
return $this;
}
/**
* Gets smsCredits
*
* @return int
*/
public function getSmsCredits()
{
return $this->container['smsCredits'];
}
/**
* Sets smsCredits
*
* @param int $smsCredits SMS credits available for your child
*
* @return $this
*/
public function setSmsCredits($smsCredits)
{
$this->container['smsCredits'] = $smsCredits;
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));
}
}

View File

@ -0,0 +1,299 @@
<?php
/**
* GetChildInfoStatistics
*
* 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;
/**
* GetChildInfoStatistics Class Doc Comment
*
* @category Class
* @description Statistics about your child account activity
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetChildInfoStatistics implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getChildInfo_statistics';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['previousMonthTotalSent' => 'int', 'currentMonthTotalSent' => 'int', 'totalSent' => 'int'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['previousMonthTotalSent' => 'int64', 'currentMonthTotalSent' => 'int64', 'totalSent' => '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 = ['previousMonthTotalSent' => 'previousMonthTotalSent', 'currentMonthTotalSent' => 'currentMonthTotalSent', 'totalSent' => 'totalSent'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['previousMonthTotalSent' => 'setPreviousMonthTotalSent', 'currentMonthTotalSent' => 'setCurrentMonthTotalSent', 'totalSent' => 'setTotalSent'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['previousMonthTotalSent' => 'getPreviousMonthTotalSent', 'currentMonthTotalSent' => 'getCurrentMonthTotalSent', 'totalSent' => 'getTotalSent'];
/**
* 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['previousMonthTotalSent'] = isset($data['previousMonthTotalSent']) ? $data['previousMonthTotalSent'] : null;
$this->container['currentMonthTotalSent'] = isset($data['currentMonthTotalSent']) ? $data['currentMonthTotalSent'] : null;
$this->container['totalSent'] = isset($data['totalSent']) ? $data['totalSent'] : null;
}
/**
* 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 previousMonthTotalSent
*
* @return int
*/
public function getPreviousMonthTotalSent()
{
return $this->container['previousMonthTotalSent'];
}
/**
* Sets previousMonthTotalSent
*
* @param int $previousMonthTotalSent Overall emails sent for the previous month
*
* @return $this
*/
public function setPreviousMonthTotalSent($previousMonthTotalSent)
{
$this->container['previousMonthTotalSent'] = $previousMonthTotalSent;
return $this;
}
/**
* Gets currentMonthTotalSent
*
* @return int
*/
public function getCurrentMonthTotalSent()
{
return $this->container['currentMonthTotalSent'];
}
/**
* Sets currentMonthTotalSent
*
* @param int $currentMonthTotalSent Overall emails sent for current month
*
* @return $this
*/
public function setCurrentMonthTotalSent($currentMonthTotalSent)
{
$this->container['currentMonthTotalSent'] = $currentMonthTotalSent;
return $this;
}
/**
* Gets totalSent
*
* @return int
*/
public function getTotalSent()
{
return $this->container['totalSent'];
}
/**
* Sets totalSent
*
* @param int $totalSent Overall emails sent for since the account exists
*
* @return $this
*/
public function setTotalSent($totalSent)
{
$this->container['totalSent'] = $totalSent;
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));
}
}

View File

@ -0,0 +1,279 @@
<?php
/**
* GetChildrenList
*
* 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;
/**
* GetChildrenList Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetChildrenList implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getChildrenList';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['children' => 'object[]', 'count' => 'int'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['children' => null, 'count' => '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 = ['children' => 'children', 'count' => 'count'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['children' => 'setChildren', 'count' => 'setCount'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['children' => 'getChildren', 'count' => 'getCount'];
/**
* 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['children'] = isset($data['children']) ? $data['children'] : null;
$this->container['count'] = isset($data['count']) ? $data['count'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['count'] === null) {
$invalidProperties[] = "'count' 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 children
*
* @return object[]
*/
public function getChildren()
{
return $this->container['children'];
}
/**
* Sets children
*
* @param object[] $children Your children's account information
*
* @return $this
*/
public function setChildren($children)
{
$this->container['children'] = $children;
return $this;
}
/**
* Gets count
*
* @return int
*/
public function getCount()
{
return $this->container['count'];
}
/**
* Sets count
*
* @param int $count Number of child accounts
*
* @return $this
*/
public function setCount($count)
{
$this->container['count'] = $count;
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));
}
}

View File

@ -0,0 +1,332 @@
<?php
/**
* GetClient
*
* 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;
/**
* GetClient Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetClient implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getClient';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['email' => 'string', 'firstName' => 'string', 'lastName' => 'string', 'companyName' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['email' => 'email', 'firstName' => null, 'lastName' => null, 'companyName' => 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'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['email' => 'setEmail', 'firstName' => 'setFirstName', 'lastName' => 'setLastName', 'companyName' => 'setCompanyName'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['email' => 'getEmail', 'firstName' => 'getFirstName', 'lastName' => 'getLastName', 'companyName' => 'getCompanyName'];
/**
* 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['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;
}
/**
* 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";
}
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 Login Email
*
* @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
*
* @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
*
* @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 Name of the company
*
* @return $this
*/
public function setCompanyName($companyName)
{
$this->container['companyName'] = $companyName;
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));
}
}

View File

@ -0,0 +1,409 @@
<?php
/**
* GetContactCampaignStats
*
* 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;
/**
* GetContactCampaignStats Class Doc Comment
*
* @category Class
* @description Campaign Statistics for the contact
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetContactCampaignStats implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getContactCampaignStats';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['messagesSent' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetExtendedContactDetailsStatisticsMessagesSent[]', 'hardBounces' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetExtendedContactDetailsStatisticsMessagesSent[]', 'softBounces' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetExtendedContactDetailsStatisticsMessagesSent[]', 'complaints' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetExtendedContactDetailsStatisticsMessagesSent[]', 'unsubscriptions' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetContactCampaignStatsUnsubscriptions', 'opened' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetContactCampaignStatsOpened[]', 'clicked' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetContactCampaignStatsClicked[]', 'transacAttributes' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetContactCampaignStatsTransacAttributes[]'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['messagesSent' => null, 'hardBounces' => null, 'softBounces' => null, 'complaints' => null, 'unsubscriptions' => null, 'opened' => null, 'clicked' => null, 'transacAttributes' => 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 = ['messagesSent' => 'messagesSent', 'hardBounces' => 'hardBounces', 'softBounces' => 'softBounces', 'complaints' => 'complaints', 'unsubscriptions' => 'unsubscriptions', 'opened' => 'opened', 'clicked' => 'clicked', 'transacAttributes' => 'transacAttributes'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['messagesSent' => 'setMessagesSent', 'hardBounces' => 'setHardBounces', 'softBounces' => 'setSoftBounces', 'complaints' => 'setComplaints', 'unsubscriptions' => 'setUnsubscriptions', 'opened' => 'setOpened', 'clicked' => 'setClicked', 'transacAttributes' => 'setTransacAttributes'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['messagesSent' => 'getMessagesSent', 'hardBounces' => 'getHardBounces', 'softBounces' => 'getSoftBounces', 'complaints' => 'getComplaints', 'unsubscriptions' => 'getUnsubscriptions', 'opened' => 'getOpened', 'clicked' => 'getClicked', 'transacAttributes' => 'getTransacAttributes'];
/**
* 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['messagesSent'] = isset($data['messagesSent']) ? $data['messagesSent'] : null;
$this->container['hardBounces'] = isset($data['hardBounces']) ? $data['hardBounces'] : null;
$this->container['softBounces'] = isset($data['softBounces']) ? $data['softBounces'] : null;
$this->container['complaints'] = isset($data['complaints']) ? $data['complaints'] : null;
$this->container['unsubscriptions'] = isset($data['unsubscriptions']) ? $data['unsubscriptions'] : null;
$this->container['opened'] = isset($data['opened']) ? $data['opened'] : null;
$this->container['clicked'] = isset($data['clicked']) ? $data['clicked'] : null;
$this->container['transacAttributes'] = isset($data['transacAttributes']) ? $data['transacAttributes'] : null;
}
/**
* 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 messagesSent
*
* @return \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]
*/
public function getMessagesSent()
{
return $this->container['messagesSent'];
}
/**
* Sets messagesSent
*
* @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] $messagesSent messagesSent
*
* @return $this
*/
public function setMessagesSent($messagesSent)
{
$this->container['messagesSent'] = $messagesSent;
return $this;
}
/**
* Gets hardBounces
*
* @return \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]
*/
public function getHardBounces()
{
return $this->container['hardBounces'];
}
/**
* Sets hardBounces
*
* @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] $hardBounces hardBounces
*
* @return $this
*/
public function setHardBounces($hardBounces)
{
$this->container['hardBounces'] = $hardBounces;
return $this;
}
/**
* Gets softBounces
*
* @return \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]
*/
public function getSoftBounces()
{
return $this->container['softBounces'];
}
/**
* Sets softBounces
*
* @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] $softBounces softBounces
*
* @return $this
*/
public function setSoftBounces($softBounces)
{
$this->container['softBounces'] = $softBounces;
return $this;
}
/**
* Gets complaints
*
* @return \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]
*/
public function getComplaints()
{
return $this->container['complaints'];
}
/**
* Sets complaints
*
* @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] $complaints complaints
*
* @return $this
*/
public function setComplaints($complaints)
{
$this->container['complaints'] = $complaints;
return $this;
}
/**
* Gets unsubscriptions
*
* @return \SendinBlue\Client\Model\GetContactCampaignStatsUnsubscriptions
*/
public function getUnsubscriptions()
{
return $this->container['unsubscriptions'];
}
/**
* Sets unsubscriptions
*
* @param \SendinBlue\Client\Model\GetContactCampaignStatsUnsubscriptions $unsubscriptions unsubscriptions
*
* @return $this
*/
public function setUnsubscriptions($unsubscriptions)
{
$this->container['unsubscriptions'] = $unsubscriptions;
return $this;
}
/**
* Gets opened
*
* @return \SendinBlue\Client\Model\GetContactCampaignStatsOpened[]
*/
public function getOpened()
{
return $this->container['opened'];
}
/**
* Sets opened
*
* @param \SendinBlue\Client\Model\GetContactCampaignStatsOpened[] $opened opened
*
* @return $this
*/
public function setOpened($opened)
{
$this->container['opened'] = $opened;
return $this;
}
/**
* Gets clicked
*
* @return \SendinBlue\Client\Model\GetContactCampaignStatsClicked[]
*/
public function getClicked()
{
return $this->container['clicked'];
}
/**
* Sets clicked
*
* @param \SendinBlue\Client\Model\GetContactCampaignStatsClicked[] $clicked clicked
*
* @return $this
*/
public function setClicked($clicked)
{
$this->container['clicked'] = $clicked;
return $this;
}
/**
* Gets transacAttributes
*
* @return \SendinBlue\Client\Model\GetContactCampaignStatsTransacAttributes[]
*/
public function getTransacAttributes()
{
return $this->container['transacAttributes'];
}
/**
* Sets transacAttributes
*
* @param \SendinBlue\Client\Model\GetContactCampaignStatsTransacAttributes[] $transacAttributes transacAttributes
*
* @return $this
*/
public function setTransacAttributes($transacAttributes)
{
$this->container['transacAttributes'] = $transacAttributes;
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));
}
}

View File

@ -0,0 +1,282 @@
<?php
/**
* GetContactCampaignStatsClicked
*
* 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;
/**
* GetContactCampaignStatsClicked Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetContactCampaignStatsClicked implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getContactCampaignStats_clicked';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['campaignId' => 'int', 'links' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetExtendedContactDetailsStatisticsLinks[]'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['campaignId' => 'int64', 'links' => null];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerTypes()
{
return self::$swaggerTypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerFormats()
{
return self::$swaggerFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = ['campaignId' => 'campaignId', 'links' => 'links'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['campaignId' => 'setCampaignId', 'links' => 'setLinks'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['campaignId' => 'getCampaignId', 'links' => 'getLinks'];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$swaggerModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['campaignId'] = isset($data['campaignId']) ? $data['campaignId'] : null;
$this->container['links'] = isset($data['links']) ? $data['links'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['campaignId'] === null) {
$invalidProperties[] = "'campaignId' can't be null";
}
if ($this->container['links'] === null) {
$invalidProperties[] = "'links' can't be null";
}
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return \count($this->listInvalidProperties()) === 0;
}
/**
* Gets campaignId
*
* @return int
*/
public function getCampaignId()
{
return $this->container['campaignId'];
}
/**
* Sets campaignId
*
* @param int $campaignId ID of the campaign which generated the event
*
* @return $this
*/
public function setCampaignId($campaignId)
{
$this->container['campaignId'] = $campaignId;
return $this;
}
/**
* Gets links
*
* @return \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsLinks[]
*/
public function getLinks()
{
return $this->container['links'];
}
/**
* Sets links
*
* @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsLinks[] $links links
*
* @return $this
*/
public function setLinks($links)
{
$this->container['links'] = $links;
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));
}
}

View File

@ -0,0 +1,332 @@
<?php
/**
* GetContactCampaignStatsOpened
*
* 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;
/**
* GetContactCampaignStatsOpened Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetContactCampaignStatsOpened implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getContactCampaignStats_opened';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['campaignId' => 'int', 'count' => 'int', 'eventTime' => '\\DateTime', 'ip' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['campaignId' => 'int64', 'count' => 'int64', 'eventTime' => 'date-time', 'ip' => null];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerTypes()
{
return self::$swaggerTypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerFormats()
{
return self::$swaggerFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = ['campaignId' => 'campaignId', 'count' => 'count', 'eventTime' => 'eventTime', 'ip' => 'ip'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['campaignId' => 'setCampaignId', 'count' => 'setCount', 'eventTime' => 'setEventTime', 'ip' => 'setIp'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['campaignId' => 'getCampaignId', 'count' => 'getCount', 'eventTime' => 'getEventTime', 'ip' => 'getIp'];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$swaggerModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['campaignId'] = isset($data['campaignId']) ? $data['campaignId'] : null;
$this->container['count'] = isset($data['count']) ? $data['count'] : null;
$this->container['eventTime'] = isset($data['eventTime']) ? $data['eventTime'] : null;
$this->container['ip'] = isset($data['ip']) ? $data['ip'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['campaignId'] === null) {
$invalidProperties[] = "'campaignId' can't be null";
}
if ($this->container['count'] === null) {
$invalidProperties[] = "'count' can't be null";
}
if ($this->container['eventTime'] === null) {
$invalidProperties[] = "'eventTime' can't be null";
}
if ($this->container['ip'] === null) {
$invalidProperties[] = "'ip' can't be null";
}
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return \count($this->listInvalidProperties()) === 0;
}
/**
* Gets campaignId
*
* @return int
*/
public function getCampaignId()
{
return $this->container['campaignId'];
}
/**
* Sets campaignId
*
* @param int $campaignId ID of the campaign which generated the event
*
* @return $this
*/
public function setCampaignId($campaignId)
{
$this->container['campaignId'] = $campaignId;
return $this;
}
/**
* Gets count
*
* @return int
*/
public function getCount()
{
return $this->container['count'];
}
/**
* Sets count
*
* @param int $count Number of openings of the campaign
*
* @return $this
*/
public function setCount($count)
{
$this->container['count'] = $count;
return $this;
}
/**
* Gets eventTime
*
* @return \DateTime
*/
public function getEventTime()
{
return $this->container['eventTime'];
}
/**
* Sets eventTime
*
* @param \DateTime $eventTime UTC date-time of the event
*
* @return $this
*/
public function setEventTime($eventTime)
{
$this->container['eventTime'] = $eventTime;
return $this;
}
/**
* Gets ip
*
* @return string
*/
public function getIp()
{
return $this->container['ip'];
}
/**
* Sets ip
*
* @param string $ip IP from which the user has opened the campaign
*
* @return $this
*/
public function setIp($ip)
{
$this->container['ip'] = $ip;
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));
}
}

View File

@ -0,0 +1,307 @@
<?php
/**
* GetContactCampaignStatsTransacAttributes
*
* 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;
/**
* GetContactCampaignStatsTransacAttributes Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetContactCampaignStatsTransacAttributes implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getContactCampaignStats_transacAttributes';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['orderDate' => '\\DateTime', 'orderPrice' => 'float', 'orderId' => 'int'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['orderDate' => 'date', 'orderPrice' => 'float', 'orderId' => '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 = ['orderDate' => 'orderDate', 'orderPrice' => 'orderPrice', 'orderId' => 'orderId'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['orderDate' => 'setOrderDate', 'orderPrice' => 'setOrderPrice', 'orderId' => 'setOrderId'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['orderDate' => 'getOrderDate', 'orderPrice' => 'getOrderPrice', 'orderId' => 'getOrderId'];
/**
* 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['orderDate'] = isset($data['orderDate']) ? $data['orderDate'] : null;
$this->container['orderPrice'] = isset($data['orderPrice']) ? $data['orderPrice'] : null;
$this->container['orderId'] = isset($data['orderId']) ? $data['orderId'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['orderDate'] === null) {
$invalidProperties[] = "'orderDate' can't be null";
}
if ($this->container['orderPrice'] === null) {
$invalidProperties[] = "'orderPrice' can't be null";
}
if ($this->container['orderId'] === null) {
$invalidProperties[] = "'orderId' 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 orderDate
*
* @return \DateTime
*/
public function getOrderDate()
{
return $this->container['orderDate'];
}
/**
* Sets orderDate
*
* @param \DateTime $orderDate Date of the order
*
* @return $this
*/
public function setOrderDate($orderDate)
{
$this->container['orderDate'] = $orderDate;
return $this;
}
/**
* Gets orderPrice
*
* @return float
*/
public function getOrderPrice()
{
return $this->container['orderPrice'];
}
/**
* Sets orderPrice
*
* @param float $orderPrice Price of the order
*
* @return $this
*/
public function setOrderPrice($orderPrice)
{
$this->container['orderPrice'] = $orderPrice;
return $this;
}
/**
* Gets orderId
*
* @return int
*/
public function getOrderId()
{
return $this->container['orderId'];
}
/**
* Sets orderId
*
* @param int $orderId ID of the order
*
* @return $this
*/
public function setOrderId($orderId)
{
$this->container['orderId'] = $orderId;
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));
}
}

View File

@ -0,0 +1,282 @@
<?php
/**
* GetContactCampaignStatsUnsubscriptions
*
* 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;
/**
* GetContactCampaignStatsUnsubscriptions Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetContactCampaignStatsUnsubscriptions implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getContactCampaignStats_unsubscriptions';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['userUnsubscription' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription[]', 'adminUnsubscription' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription[]'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['userUnsubscription' => null, 'adminUnsubscription' => 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 = ['userUnsubscription' => 'userUnsubscription', 'adminUnsubscription' => 'adminUnsubscription'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['userUnsubscription' => 'setUserUnsubscription', 'adminUnsubscription' => 'setAdminUnsubscription'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['userUnsubscription' => 'getUserUnsubscription', 'adminUnsubscription' => 'getAdminUnsubscription'];
/**
* 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['userUnsubscription'] = isset($data['userUnsubscription']) ? $data['userUnsubscription'] : null;
$this->container['adminUnsubscription'] = isset($data['adminUnsubscription']) ? $data['adminUnsubscription'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['userUnsubscription'] === null) {
$invalidProperties[] = "'userUnsubscription' can't be null";
}
if ($this->container['adminUnsubscription'] === null) {
$invalidProperties[] = "'adminUnsubscription' 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 userUnsubscription
*
* @return \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription[]
*/
public function getUserUnsubscription()
{
return $this->container['userUnsubscription'];
}
/**
* Sets userUnsubscription
*
* @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription[] $userUnsubscription Contact has unsubscribed via the unsubscription link in the email
*
* @return $this
*/
public function setUserUnsubscription($userUnsubscription)
{
$this->container['userUnsubscription'] = $userUnsubscription;
return $this;
}
/**
* Gets adminUnsubscription
*
* @return \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription[]
*/
public function getAdminUnsubscription()
{
return $this->container['adminUnsubscription'];
}
/**
* Sets adminUnsubscription
*
* @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription[] $adminUnsubscription Contact has been unsubscribed from the administrator
*
* @return $this
*/
public function setAdminUnsubscription($adminUnsubscription)
{
$this->container['adminUnsubscription'] = $adminUnsubscription;
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));
}
}

View File

@ -0,0 +1,454 @@
<?php
/**
* GetContactDetails
*
* 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;
/**
* GetContactDetails Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetContactDetails implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getContactDetails';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['email' => 'string', 'id' => 'int', 'emailBlacklisted' => 'bool', 'smsBlacklisted' => 'bool', 'createdAt' => '\\DateTime', 'modifiedAt' => '\\DateTime', 'listIds' => 'int[]', 'listUnsubscribed' => 'int[]', 'attributes' => 'object'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['email' => 'email', 'id' => 'int64', 'emailBlacklisted' => null, 'smsBlacklisted' => null, 'createdAt' => 'date-time', 'modifiedAt' => 'date-time', 'listIds' => 'int64', 'listUnsubscribed' => 'int64', '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 = ['email' => 'email', 'id' => 'id', 'emailBlacklisted' => 'emailBlacklisted', 'smsBlacklisted' => 'smsBlacklisted', 'createdAt' => 'createdAt', 'modifiedAt' => 'modifiedAt', 'listIds' => 'listIds', 'listUnsubscribed' => 'listUnsubscribed', 'attributes' => 'attributes'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['email' => 'setEmail', 'id' => 'setId', 'emailBlacklisted' => 'setEmailBlacklisted', 'smsBlacklisted' => 'setSmsBlacklisted', 'createdAt' => 'setCreatedAt', 'modifiedAt' => 'setModifiedAt', 'listIds' => 'setListIds', 'listUnsubscribed' => 'setListUnsubscribed', 'attributes' => 'setAttributes'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['email' => 'getEmail', 'id' => 'getId', 'emailBlacklisted' => 'getEmailBlacklisted', 'smsBlacklisted' => 'getSmsBlacklisted', 'createdAt' => 'getCreatedAt', 'modifiedAt' => 'getModifiedAt', 'listIds' => 'getListIds', 'listUnsubscribed' => 'getListUnsubscribed', '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['email'] = isset($data['email']) ? $data['email'] : null;
$this->container['id'] = isset($data['id']) ? $data['id'] : null;
$this->container['emailBlacklisted'] = isset($data['emailBlacklisted']) ? $data['emailBlacklisted'] : null;
$this->container['smsBlacklisted'] = isset($data['smsBlacklisted']) ? $data['smsBlacklisted'] : null;
$this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null;
$this->container['modifiedAt'] = isset($data['modifiedAt']) ? $data['modifiedAt'] : null;
$this->container['listIds'] = isset($data['listIds']) ? $data['listIds'] : null;
$this->container['listUnsubscribed'] = isset($data['listUnsubscribed']) ? $data['listUnsubscribed'] : null;
$this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null;
}
/**
* 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['id'] === null) {
$invalidProperties[] = "'id' can't be null";
}
if ($this->container['emailBlacklisted'] === null) {
$invalidProperties[] = "'emailBlacklisted' can't be null";
}
if ($this->container['smsBlacklisted'] === null) {
$invalidProperties[] = "'smsBlacklisted' can't be null";
}
if ($this->container['createdAt'] === null) {
$invalidProperties[] = "'createdAt' can't be null";
}
if ($this->container['modifiedAt'] === null) {
$invalidProperties[] = "'modifiedAt' can't be null";
}
if ($this->container['listIds'] === null) {
$invalidProperties[] = "'listIds' can't be null";
}
if ($this->container['attributes'] === null) {
$invalidProperties[] = "'attributes' can't be null";
}
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 contact for which you requested the details
*
* @return $this
*/
public function setEmail($email)
{
$this->container['email'] = $email;
return $this;
}
/**
* Gets id
*
* @return int
*/
public function getId()
{
return $this->container['id'];
}
/**
* Sets id
*
* @param int $id ID of the contact for which you requested the details
*
* @return $this
*/
public function setId($id)
{
$this->container['id'] = $id;
return $this;
}
/**
* Gets emailBlacklisted
*
* @return bool
*/
public function getEmailBlacklisted()
{
return $this->container['emailBlacklisted'];
}
/**
* Sets emailBlacklisted
*
* @param bool $emailBlacklisted Blacklist status for email campaigns (true=blacklisted, false=not blacklisted)
*
* @return $this
*/
public function setEmailBlacklisted($emailBlacklisted)
{
$this->container['emailBlacklisted'] = $emailBlacklisted;
return $this;
}
/**
* Gets smsBlacklisted
*
* @return bool
*/
public function getSmsBlacklisted()
{
return $this->container['smsBlacklisted'];
}
/**
* Sets smsBlacklisted
*
* @param bool $smsBlacklisted Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted)
*
* @return $this
*/
public function setSmsBlacklisted($smsBlacklisted)
{
$this->container['smsBlacklisted'] = $smsBlacklisted;
return $this;
}
/**
* Gets createdAt
*
* @return \DateTime
*/
public function getCreatedAt()
{
return $this->container['createdAt'];
}
/**
* Sets createdAt
*
* @param \DateTime $createdAt Creation UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ)
*
* @return $this
*/
public function setCreatedAt($createdAt)
{
$this->container['createdAt'] = $createdAt;
return $this;
}
/**
* Gets modifiedAt
*
* @return \DateTime
*/
public function getModifiedAt()
{
return $this->container['modifiedAt'];
}
/**
* Sets modifiedAt
*
* @param \DateTime $modifiedAt Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ)
*
* @return $this
*/
public function setModifiedAt($modifiedAt)
{
$this->container['modifiedAt'] = $modifiedAt;
return $this;
}
/**
* Gets listIds
*
* @return int[]
*/
public function getListIds()
{
return $this->container['listIds'];
}
/**
* Sets listIds
*
* @param int[] $listIds listIds
*
* @return $this
*/
public function setListIds($listIds)
{
$this->container['listIds'] = $listIds;
return $this;
}
/**
* Gets listUnsubscribed
*
* @return int[]
*/
public function getListUnsubscribed()
{
return $this->container['listUnsubscribed'];
}
/**
* Sets listUnsubscribed
*
* @param int[] $listUnsubscribed listUnsubscribed
*
* @return $this
*/
public function setListUnsubscribed($listUnsubscribed)
{
$this->container['listUnsubscribed'] = $listUnsubscribed;
return $this;
}
/**
* Gets attributes
*
* @return object
*/
public function getAttributes()
{
return $this->container['attributes'];
}
/**
* Sets attributes
*
* @param object $attributes Set of attributes of the contact
*
* @return $this
*/
public function setAttributes($attributes)
{
$this->container['attributes'] = $attributes;
return $this;
}
/**
* 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));
}
}

View File

@ -0,0 +1,282 @@
<?php
/**
* GetContacts
*
* 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;
/**
* GetContacts Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetContacts implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getContacts';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['contacts' => 'object[]', 'count' => 'int'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['contacts' => null, 'count' => '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 = ['contacts' => 'contacts', 'count' => 'count'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['contacts' => 'setContacts', 'count' => 'setCount'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['contacts' => 'getContacts', 'count' => 'getCount'];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$swaggerModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['contacts'] = isset($data['contacts']) ? $data['contacts'] : null;
$this->container['count'] = isset($data['count']) ? $data['count'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['contacts'] === null) {
$invalidProperties[] = "'contacts' can't be null";
}
if ($this->container['count'] === null) {
$invalidProperties[] = "'count' 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 contacts
*
* @return object[]
*/
public function getContacts()
{
return $this->container['contacts'];
}
/**
* Sets contacts
*
* @param object[] $contacts contacts
*
* @return $this
*/
public function setContacts($contacts)
{
$this->container['contacts'] = $contacts;
return $this;
}
/**
* Gets count
*
* @return int
*/
public function getCount()
{
return $this->container['count'];
}
/**
* Sets count
*
* @param int $count Number of contacts
*
* @return $this
*/
public function setCount($count)
{
$this->container['count'] = $count;
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));
}
}

View File

@ -0,0 +1,332 @@
<?php
/**
* GetDeviceBrowserStats
*
* 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;
/**
* GetDeviceBrowserStats Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetDeviceBrowserStats implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getDeviceBrowserStats';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['clickers' => 'int', 'uniqueClicks' => 'int', 'viewed' => 'int', 'uniqueViews' => 'int'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['clickers' => 'int64', 'uniqueClicks' => 'int64', 'viewed' => 'int64', 'uniqueViews' => '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 = ['clickers' => 'clickers', 'uniqueClicks' => 'uniqueClicks', 'viewed' => 'viewed', 'uniqueViews' => 'uniqueViews'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['clickers' => 'setClickers', 'uniqueClicks' => 'setUniqueClicks', 'viewed' => 'setViewed', 'uniqueViews' => 'setUniqueViews'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['clickers' => 'getClickers', 'uniqueClicks' => 'getUniqueClicks', 'viewed' => 'getViewed', 'uniqueViews' => 'getUniqueViews'];
/**
* 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['clickers'] = isset($data['clickers']) ? $data['clickers'] : null;
$this->container['uniqueClicks'] = isset($data['uniqueClicks']) ? $data['uniqueClicks'] : null;
$this->container['viewed'] = isset($data['viewed']) ? $data['viewed'] : null;
$this->container['uniqueViews'] = isset($data['uniqueViews']) ? $data['uniqueViews'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['clickers'] === null) {
$invalidProperties[] = "'clickers' can't be null";
}
if ($this->container['uniqueClicks'] === null) {
$invalidProperties[] = "'uniqueClicks' can't be null";
}
if ($this->container['viewed'] === null) {
$invalidProperties[] = "'viewed' can't be null";
}
if ($this->container['uniqueViews'] === null) {
$invalidProperties[] = "'uniqueViews' 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 clickers
*
* @return int
*/
public function getClickers()
{
return $this->container['clickers'];
}
/**
* Sets clickers
*
* @param int $clickers Number of total clicks for the campaign using the particular browser
*
* @return $this
*/
public function setClickers($clickers)
{
$this->container['clickers'] = $clickers;
return $this;
}
/**
* Gets uniqueClicks
*
* @return int
*/
public function getUniqueClicks()
{
return $this->container['uniqueClicks'];
}
/**
* Sets uniqueClicks
*
* @param int $uniqueClicks Number of unique clicks for the campaign using the particular browser
*
* @return $this
*/
public function setUniqueClicks($uniqueClicks)
{
$this->container['uniqueClicks'] = $uniqueClicks;
return $this;
}
/**
* Gets viewed
*
* @return int
*/
public function getViewed()
{
return $this->container['viewed'];
}
/**
* Sets viewed
*
* @param int $viewed Number of openings for the campaign using the particular browser
*
* @return $this
*/
public function setViewed($viewed)
{
$this->container['viewed'] = $viewed;
return $this;
}
/**
* Gets uniqueViews
*
* @return int
*/
public function getUniqueViews()
{
return $this->container['uniqueViews'];
}
/**
* Sets uniqueViews
*
* @param int $uniqueViews Number of unique openings for the campaign using the particular browser
*
* @return $this
*/
public function setUniqueViews($uniqueViews)
{
$this->container['uniqueViews'] = $uniqueViews;
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));
}
}

View File

@ -0,0 +1,279 @@
<?php
/**
* GetEmailCampaigns
*
* 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;
/**
* GetEmailCampaigns Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetEmailCampaigns implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getEmailCampaigns';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['campaigns' => 'object[]', 'count' => 'int'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['campaigns' => null, 'count' => '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 = ['campaigns' => 'campaigns', 'count' => 'count'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['campaigns' => 'setCampaigns', 'count' => 'setCount'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['campaigns' => 'getCampaigns', 'count' => 'getCount'];
/**
* 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['campaigns'] = isset($data['campaigns']) ? $data['campaigns'] : null;
$this->container['count'] = isset($data['count']) ? $data['count'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['count'] === null) {
$invalidProperties[] = "'count' 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 campaigns
*
* @return object[]
*/
public function getCampaigns()
{
return $this->container['campaigns'];
}
/**
* Sets campaigns
*
* @param object[] $campaigns campaigns
*
* @return $this
*/
public function setCampaigns($campaigns)
{
$this->container['campaigns'] = $campaigns;
return $this;
}
/**
* Gets count
*
* @return int
*/
public function getCount()
{
return $this->container['count'];
}
/**
* Sets count
*
* @param int $count Number of Email campaigns retrieved
*
* @return $this
*/
public function setCount($count)
{
$this->container['count'] = $count;
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));
}
}

View File

@ -0,0 +1,254 @@
<?php
/**
* GetEmailEventReport
*
* 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;
/**
* GetEmailEventReport Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetEmailEventReport implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getEmailEventReport';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['events' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetEmailEventReportEvents[]'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['events' => null];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerTypes()
{
return self::$swaggerTypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerFormats()
{
return self::$swaggerFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = ['events' => 'events'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['events' => 'setEvents'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['events' => 'getEvents'];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$swaggerModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['events'] = isset($data['events']) ? $data['events'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return \count($this->listInvalidProperties()) === 0;
}
/**
* Gets events
*
* @return \SendinBlue\Client\Model\GetEmailEventReportEvents[]
*/
public function getEvents()
{
return $this->container['events'];
}
/**
* Sets events
*
* @param \SendinBlue\Client\Model\GetEmailEventReportEvents[] $events events
*
* @return $this
*/
public function setEvents($events)
{
$this->container['events'] = $events;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
{
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
{
if (\is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
{
unset($this->container[$offset]);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (\defined('JSON_PRETTY_PRINT')) {
// use JSON pretty print
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -0,0 +1,493 @@
<?php
/**
* GetEmailEventReportEvents
*
* 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;
/**
* GetEmailEventReportEvents Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetEmailEventReportEvents implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getEmailEventReport_events';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['email' => 'string', 'date' => '\\DateTime', 'subject' => 'string', 'messageId' => 'string', 'event' => 'string', 'reason' => 'string', 'tag' => 'string', 'ip' => 'string', 'link' => 'string', 'from' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['email' => 'email', 'date' => 'date-time', 'subject' => null, 'messageId' => null, 'event' => null, 'reason' => null, 'tag' => null, 'ip' => null, 'link' => null, 'from' => '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', 'date' => 'date', 'subject' => 'subject', 'messageId' => 'messageId', 'event' => 'event', 'reason' => 'reason', 'tag' => 'tag', 'ip' => 'ip', 'link' => 'link', 'from' => 'from'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['email' => 'setEmail', 'date' => 'setDate', 'subject' => 'setSubject', 'messageId' => 'setMessageId', 'event' => 'setEvent', 'reason' => 'setReason', 'tag' => 'setTag', 'ip' => 'setIp', 'link' => 'setLink', 'from' => 'setFrom'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['email' => 'getEmail', 'date' => 'getDate', 'subject' => 'getSubject', 'messageId' => 'getMessageId', 'event' => 'getEvent', 'reason' => 'getReason', 'tag' => 'getTag', 'ip' => 'getIp', 'link' => 'getLink', 'from' => 'getFrom'];
/**
* 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 EVENT_BOUNCES = 'bounces';
const EVENT_HARD_BOUNCES = 'hardBounces';
const EVENT_SOFT_BOUNCES = 'softBounces';
const EVENT_DELIVERED = 'delivered';
const EVENT_SPAM = 'spam';
const EVENT_REQUESTS = 'requests';
const EVENT_OPENED = 'opened';
const EVENT_CLICKS = 'clicks';
const EVENT_INVALID = 'invalid';
const EVENT_DEFERRED = 'deferred';
const EVENT_BLOCKED = 'blocked';
const EVENT_UNSUBSCRIBED = 'unsubscribed';
/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getEventAllowableValues()
{
return [self::EVENT_BOUNCES, self::EVENT_HARD_BOUNCES, self::EVENT_SOFT_BOUNCES, self::EVENT_DELIVERED, self::EVENT_SPAM, self::EVENT_REQUESTS, self::EVENT_OPENED, self::EVENT_CLICKS, self::EVENT_INVALID, self::EVENT_DEFERRED, self::EVENT_BLOCKED, self::EVENT_UNSUBSCRIBED];
}
/**
* 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['date'] = isset($data['date']) ? $data['date'] : null;
$this->container['subject'] = isset($data['subject']) ? $data['subject'] : null;
$this->container['messageId'] = isset($data['messageId']) ? $data['messageId'] : null;
$this->container['event'] = isset($data['event']) ? $data['event'] : null;
$this->container['reason'] = isset($data['reason']) ? $data['reason'] : null;
$this->container['tag'] = isset($data['tag']) ? $data['tag'] : null;
$this->container['ip'] = isset($data['ip']) ? $data['ip'] : null;
$this->container['link'] = isset($data['link']) ? $data['link'] : null;
$this->container['from'] = isset($data['from']) ? $data['from'] : null;
}
/**
* 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['date'] === null) {
$invalidProperties[] = "'date' can't be null";
}
if ($this->container['messageId'] === null) {
$invalidProperties[] = "'messageId' can't be null";
}
if ($this->container['event'] === null) {
$invalidProperties[] = "'event' can't be null";
}
$allowedValues = $this->getEventAllowableValues();
if (!\is_null($this->container['event']) && !\in_array($this->container['event'], $allowedValues, \true)) {
$invalidProperties[] = \sprintf("invalid value for 'event', 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 which generates the event
*
* @return $this
*/
public function setEmail($email)
{
$this->container['email'] = $email;
return $this;
}
/**
* Gets date
*
* @return \DateTime
*/
public function getDate()
{
return $this->container['date'];
}
/**
* Sets date
*
* @param \DateTime $date UTC date-time on which the event has been generated
*
* @return $this
*/
public function setDate($date)
{
$this->container['date'] = $date;
return $this;
}
/**
* Gets subject
*
* @return string
*/
public function getSubject()
{
return $this->container['subject'];
}
/**
* Sets subject
*
* @param string $subject Subject of the event
*
* @return $this
*/
public function setSubject($subject)
{
$this->container['subject'] = $subject;
return $this;
}
/**
* Gets messageId
*
* @return string
*/
public function getMessageId()
{
return $this->container['messageId'];
}
/**
* Sets messageId
*
* @param string $messageId Message ID which generated the event
*
* @return $this
*/
public function setMessageId($messageId)
{
$this->container['messageId'] = $messageId;
return $this;
}
/**
* Gets event
*
* @return string
*/
public function getEvent()
{
return $this->container['event'];
}
/**
* Sets event
*
* @param string $event Event which occurred
*
* @return $this
*/
public function setEvent($event)
{
$allowedValues = $this->getEventAllowableValues();
if (!\in_array($event, $allowedValues, \true)) {
throw new \InvalidArgumentException(\sprintf("Invalid value for 'event', must be one of '%s'", \implode("', '", $allowedValues)));
}
$this->container['event'] = $event;
return $this;
}
/**
* Gets reason
*
* @return string
*/
public function getReason()
{
return $this->container['reason'];
}
/**
* Sets reason
*
* @param string $reason Reason of bounce (only available if the event is hardbounce or softbounce)
*
* @return $this
*/
public function setReason($reason)
{
$this->container['reason'] = $reason;
return $this;
}
/**
* Gets tag
*
* @return string
*/
public function getTag()
{
return $this->container['tag'];
}
/**
* Sets tag
*
* @param string $tag Tag of the email which generated the event
*
* @return $this
*/
public function setTag($tag)
{
$this->container['tag'] = $tag;
return $this;
}
/**
* Gets ip
*
* @return string
*/
public function getIp()
{
return $this->container['ip'];
}
/**
* Sets ip
*
* @param string $ip IP from which the user has opened the email or clicked on the link (only available if the event is opened or clicks)
*
* @return $this
*/
public function setIp($ip)
{
$this->container['ip'] = $ip;
return $this;
}
/**
* Gets link
*
* @return string
*/
public function getLink()
{
return $this->container['link'];
}
/**
* Sets link
*
* @param string $link The link which is sent to the user (only available if the event is requests or opened or clicks)
*
* @return $this
*/
public function setLink($link)
{
$this->container['link'] = $link;
return $this;
}
/**
* Gets from
*
* @return string
*/
public function getFrom()
{
return $this->container['from'];
}
/**
* Sets from
*
* @param string $from Sender email from which the emails are sent
*
* @return $this
*/
public function setFrom($from)
{
$this->container['from'] = $from;
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));
}
}

View File

@ -0,0 +1,954 @@
<?php
/**
* GetExtendedCampaignOverview
*
* 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;
/**
* GetExtendedCampaignOverview Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetExtendedCampaignOverview implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getExtendedCampaignOverview';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['id' => 'int', 'name' => 'string', 'subject' => 'string', 'type' => 'string', 'status' => 'string', 'scheduledAt' => '\\DateTime', 'abTesting' => 'bool', 'subjectA' => 'string', 'subjectB' => 'string', 'splitRule' => 'int', 'winnerCriteria' => 'string', 'winnerDelay' => 'int', 'sendAtBestTime' => 'bool', 'testSent' => 'bool', 'header' => 'string', 'footer' => 'string', 'sender' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetExtendedCampaignOverviewSender', 'replyTo' => 'string', 'toField' => 'string', 'htmlContent' => 'string', 'shareLink' => 'string', 'tag' => 'string', 'createdAt' => '\\DateTime', 'modifiedAt' => '\\DateTime', 'inlineImageActivation' => 'bool', 'mirrorActive' => 'bool', 'recurring' => 'bool', 'sentDate' => '\\DateTime', 'returnBounce' => 'int'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['id' => 'int64', 'name' => null, 'subject' => null, 'type' => null, 'status' => null, 'scheduledAt' => 'date-time', 'abTesting' => null, 'subjectA' => null, 'subjectB' => null, 'splitRule' => null, 'winnerCriteria' => null, 'winnerDelay' => null, 'sendAtBestTime' => null, 'testSent' => null, 'header' => null, 'footer' => null, 'sender' => null, 'replyTo' => 'email', 'toField' => null, 'htmlContent' => null, 'shareLink' => 'url', 'tag' => null, 'createdAt' => 'date-time', 'modifiedAt' => 'date-time', 'inlineImageActivation' => null, 'mirrorActive' => null, 'recurring' => null, 'sentDate' => 'date-time', 'returnBounce' => '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', 'name' => 'name', 'subject' => 'subject', 'type' => 'type', 'status' => 'status', 'scheduledAt' => 'scheduledAt', 'abTesting' => 'abTesting', 'subjectA' => 'subjectA', 'subjectB' => 'subjectB', 'splitRule' => 'splitRule', 'winnerCriteria' => 'winnerCriteria', 'winnerDelay' => 'winnerDelay', 'sendAtBestTime' => 'sendAtBestTime', 'testSent' => 'testSent', 'header' => 'header', 'footer' => 'footer', 'sender' => 'sender', 'replyTo' => 'replyTo', 'toField' => 'toField', 'htmlContent' => 'htmlContent', 'shareLink' => 'shareLink', 'tag' => 'tag', 'createdAt' => 'createdAt', 'modifiedAt' => 'modifiedAt', 'inlineImageActivation' => 'inlineImageActivation', 'mirrorActive' => 'mirrorActive', 'recurring' => 'recurring', 'sentDate' => 'sentDate', 'returnBounce' => 'returnBounce'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['id' => 'setId', 'name' => 'setName', 'subject' => 'setSubject', 'type' => 'setType', 'status' => 'setStatus', 'scheduledAt' => 'setScheduledAt', 'abTesting' => 'setAbTesting', 'subjectA' => 'setSubjectA', 'subjectB' => 'setSubjectB', 'splitRule' => 'setSplitRule', 'winnerCriteria' => 'setWinnerCriteria', 'winnerDelay' => 'setWinnerDelay', 'sendAtBestTime' => 'setSendAtBestTime', 'testSent' => 'setTestSent', 'header' => 'setHeader', 'footer' => 'setFooter', 'sender' => 'setSender', 'replyTo' => 'setReplyTo', 'toField' => 'setToField', 'htmlContent' => 'setHtmlContent', 'shareLink' => 'setShareLink', 'tag' => 'setTag', 'createdAt' => 'setCreatedAt', 'modifiedAt' => 'setModifiedAt', 'inlineImageActivation' => 'setInlineImageActivation', 'mirrorActive' => 'setMirrorActive', 'recurring' => 'setRecurring', 'sentDate' => 'setSentDate', 'returnBounce' => 'setReturnBounce'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['id' => 'getId', 'name' => 'getName', 'subject' => 'getSubject', 'type' => 'getType', 'status' => 'getStatus', 'scheduledAt' => 'getScheduledAt', 'abTesting' => 'getAbTesting', 'subjectA' => 'getSubjectA', 'subjectB' => 'getSubjectB', 'splitRule' => 'getSplitRule', 'winnerCriteria' => 'getWinnerCriteria', 'winnerDelay' => 'getWinnerDelay', 'sendAtBestTime' => 'getSendAtBestTime', 'testSent' => 'getTestSent', 'header' => 'getHeader', 'footer' => 'getFooter', 'sender' => 'getSender', 'replyTo' => 'getReplyTo', 'toField' => 'getToField', 'htmlContent' => 'getHtmlContent', 'shareLink' => 'getShareLink', 'tag' => 'getTag', 'createdAt' => 'getCreatedAt', 'modifiedAt' => 'getModifiedAt', 'inlineImageActivation' => 'getInlineImageActivation', 'mirrorActive' => 'getMirrorActive', 'recurring' => 'getRecurring', 'sentDate' => 'getSentDate', 'returnBounce' => 'getReturnBounce'];
/**
* 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_CLASSIC = 'classic';
const TYPE_TRIGGER = 'trigger';
const STATUS_DRAFT = 'draft';
const STATUS_SENT = 'sent';
const STATUS_ARCHIVE = 'archive';
const STATUS_QUEUED = 'queued';
const STATUS_SUSPENDED = 'suspended';
const STATUS_IN_PROCESS = 'in_process';
/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getTypeAllowableValues()
{
return [self::TYPE_CLASSIC, self::TYPE_TRIGGER];
}
/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getStatusAllowableValues()
{
return [self::STATUS_DRAFT, self::STATUS_SENT, self::STATUS_ARCHIVE, self::STATUS_QUEUED, self::STATUS_SUSPENDED, self::STATUS_IN_PROCESS];
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @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['subject'] = isset($data['subject']) ? $data['subject'] : null;
$this->container['type'] = isset($data['type']) ? $data['type'] : null;
$this->container['status'] = isset($data['status']) ? $data['status'] : null;
$this->container['scheduledAt'] = isset($data['scheduledAt']) ? $data['scheduledAt'] : null;
$this->container['abTesting'] = isset($data['abTesting']) ? $data['abTesting'] : null;
$this->container['subjectA'] = isset($data['subjectA']) ? $data['subjectA'] : null;
$this->container['subjectB'] = isset($data['subjectB']) ? $data['subjectB'] : null;
$this->container['splitRule'] = isset($data['splitRule']) ? $data['splitRule'] : null;
$this->container['winnerCriteria'] = isset($data['winnerCriteria']) ? $data['winnerCriteria'] : null;
$this->container['winnerDelay'] = isset($data['winnerDelay']) ? $data['winnerDelay'] : null;
$this->container['sendAtBestTime'] = isset($data['sendAtBestTime']) ? $data['sendAtBestTime'] : null;
$this->container['testSent'] = isset($data['testSent']) ? $data['testSent'] : null;
$this->container['header'] = isset($data['header']) ? $data['header'] : null;
$this->container['footer'] = isset($data['footer']) ? $data['footer'] : null;
$this->container['sender'] = isset($data['sender']) ? $data['sender'] : null;
$this->container['replyTo'] = isset($data['replyTo']) ? $data['replyTo'] : null;
$this->container['toField'] = isset($data['toField']) ? $data['toField'] : null;
$this->container['htmlContent'] = isset($data['htmlContent']) ? $data['htmlContent'] : null;
$this->container['shareLink'] = isset($data['shareLink']) ? $data['shareLink'] : null;
$this->container['tag'] = isset($data['tag']) ? $data['tag'] : null;
$this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null;
$this->container['modifiedAt'] = isset($data['modifiedAt']) ? $data['modifiedAt'] : null;
$this->container['inlineImageActivation'] = isset($data['inlineImageActivation']) ? $data['inlineImageActivation'] : null;
$this->container['mirrorActive'] = isset($data['mirrorActive']) ? $data['mirrorActive'] : null;
$this->container['recurring'] = isset($data['recurring']) ? $data['recurring'] : null;
$this->container['sentDate'] = isset($data['sentDate']) ? $data['sentDate'] : null;
$this->container['returnBounce'] = isset($data['returnBounce']) ? $data['returnBounce'] : null;
}
/**
* 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";
}
if ($this->container['type'] === null) {
$invalidProperties[] = "'type' can't be null";
}
$allowedValues = $this->getTypeAllowableValues();
if (!\is_null($this->container['type']) && !\in_array($this->container['type'], $allowedValues, \true)) {
$invalidProperties[] = \sprintf("invalid value for 'type', must be one of '%s'", \implode("', '", $allowedValues));
}
if ($this->container['status'] === null) {
$invalidProperties[] = "'status' can't be null";
}
$allowedValues = $this->getStatusAllowableValues();
if (!\is_null($this->container['status']) && !\in_array($this->container['status'], $allowedValues, \true)) {
$invalidProperties[] = \sprintf("invalid value for 'status', must be one of '%s'", \implode("', '", $allowedValues));
}
if ($this->container['testSent'] === null) {
$invalidProperties[] = "'testSent' can't be null";
}
if ($this->container['header'] === null) {
$invalidProperties[] = "'header' can't be null";
}
if ($this->container['footer'] === null) {
$invalidProperties[] = "'footer' can't be null";
}
if ($this->container['sender'] === null) {
$invalidProperties[] = "'sender' can't be null";
}
if ($this->container['replyTo'] === null) {
$invalidProperties[] = "'replyTo' can't be null";
}
if ($this->container['toField'] === null) {
$invalidProperties[] = "'toField' can't be null";
}
if ($this->container['htmlContent'] === null) {
$invalidProperties[] = "'htmlContent' can't be null";
}
if ($this->container['tag'] === null) {
$invalidProperties[] = "'tag' can't be null";
}
if ($this->container['createdAt'] === null) {
$invalidProperties[] = "'createdAt' can't be null";
}
if ($this->container['modifiedAt'] === null) {
$invalidProperties[] = "'modifiedAt' can't be null";
}
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 campaign
*
* @return $this
*/
public function setId($id)
{
$this->container['id'] = $id;
return $this;
}
/**
* Gets name
*
* @return string
*/
public function getName()
{
return $this->container['name'];
}
/**
* Sets name
*
* @param string $name Name of the campaign
*
* @return $this
*/
public function setName($name)
{
$this->container['name'] = $name;
return $this;
}
/**
* Gets subject
*
* @return string
*/
public function getSubject()
{
return $this->container['subject'];
}
/**
* Sets subject
*
* @param string $subject Subject of the campaign. Only available if `abTesting` flag of the campaign is `false`
*
* @return $this
*/
public function setSubject($subject)
{
$this->container['subject'] = $subject;
return $this;
}
/**
* Gets type
*
* @return string
*/
public function getType()
{
return $this->container['type'];
}
/**
* Sets type
*
* @param string $type Type of campaign
*
* @return $this
*/
public function setType($type)
{
$allowedValues = $this->getTypeAllowableValues();
if (!\in_array($type, $allowedValues, \true)) {
throw new \InvalidArgumentException(\sprintf("Invalid value for 'type', must be one of '%s'", \implode("', '", $allowedValues)));
}
$this->container['type'] = $type;
return $this;
}
/**
* Gets status
*
* @return string
*/
public function getStatus()
{
return $this->container['status'];
}
/**
* Sets status
*
* @param string $status Status of the campaign
*
* @return $this
*/
public function setStatus($status)
{
$allowedValues = $this->getStatusAllowableValues();
if (!\in_array($status, $allowedValues, \true)) {
throw new \InvalidArgumentException(\sprintf("Invalid value for 'status', must be one of '%s'", \implode("', '", $allowedValues)));
}
$this->container['status'] = $status;
return $this;
}
/**
* Gets scheduledAt
*
* @return \DateTime
*/
public function getScheduledAt()
{
return $this->container['scheduledAt'];
}
/**
* Sets scheduledAt
*
* @param \DateTime $scheduledAt UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ)
*
* @return $this
*/
public function setScheduledAt($scheduledAt)
{
$this->container['scheduledAt'] = $scheduledAt;
return $this;
}
/**
* Gets abTesting
*
* @return bool
*/
public function getAbTesting()
{
return $this->container['abTesting'];
}
/**
* Sets abTesting
*
* @param bool $abTesting Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled.
*
* @return $this
*/
public function setAbTesting($abTesting)
{
$this->container['abTesting'] = $abTesting;
return $this;
}
/**
* Gets subjectA
*
* @return string
*/
public function getSubjectA()
{
return $this->container['subjectA'];
}
/**
* Sets subjectA
*
* @param string $subjectA Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true`
*
* @return $this
*/
public function setSubjectA($subjectA)
{
$this->container['subjectA'] = $subjectA;
return $this;
}
/**
* Gets subjectB
*
* @return string
*/
public function getSubjectB()
{
return $this->container['subjectB'];
}
/**
* Sets subjectB
*
* @param string $subjectB Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true`
*
* @return $this
*/
public function setSubjectB($subjectB)
{
$this->container['subjectB'] = $subjectB;
return $this;
}
/**
* Gets splitRule
*
* @return int
*/
public function getSplitRule()
{
return $this->container['splitRule'];
}
/**
* Sets splitRule
*
* @param int $splitRule The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true`
*
* @return $this
*/
public function setSplitRule($splitRule)
{
$this->container['splitRule'] = $splitRule;
return $this;
}
/**
* Gets winnerCriteria
*
* @return string
*/
public function getWinnerCriteria()
{
return $this->container['winnerCriteria'];
}
/**
* Sets winnerCriteria
*
* @param string $winnerCriteria Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true`
*
* @return $this
*/
public function setWinnerCriteria($winnerCriteria)
{
$this->container['winnerCriteria'] = $winnerCriteria;
return $this;
}
/**
* Gets winnerDelay
*
* @return int
*/
public function getWinnerDelay()
{
return $this->container['winnerDelay'];
}
/**
* Sets winnerDelay
*
* @param int $winnerDelay The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true`
*
* @return $this
*/
public function setWinnerDelay($winnerDelay)
{
$this->container['winnerDelay'] = $winnerDelay;
return $this;
}
/**
* Gets sendAtBestTime
*
* @return bool
*/
public function getSendAtBestTime()
{
return $this->container['sendAtBestTime'];
}
/**
* Sets sendAtBestTime
*
* @param bool $sendAtBestTime It is true if you have chosen to send your campaign at best time, otherwise it is false
*
* @return $this
*/
public function setSendAtBestTime($sendAtBestTime)
{
$this->container['sendAtBestTime'] = $sendAtBestTime;
return $this;
}
/**
* Gets testSent
*
* @return bool
*/
public function getTestSent()
{
return $this->container['testSent'];
}
/**
* Sets testSent
*
* @param bool $testSent Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent)
*
* @return $this
*/
public function setTestSent($testSent)
{
$this->container['testSent'] = $testSent;
return $this;
}
/**
* Gets header
*
* @return string
*/
public function getHeader()
{
return $this->container['header'];
}
/**
* Sets header
*
* @param string $header Header of the campaign
*
* @return $this
*/
public function setHeader($header)
{
$this->container['header'] = $header;
return $this;
}
/**
* Gets footer
*
* @return string
*/
public function getFooter()
{
return $this->container['footer'];
}
/**
* Sets footer
*
* @param string $footer Footer of the campaign
*
* @return $this
*/
public function setFooter($footer)
{
$this->container['footer'] = $footer;
return $this;
}
/**
* Gets sender
*
* @return \SendinBlue\Client\Model\GetExtendedCampaignOverviewSender
*/
public function getSender()
{
return $this->container['sender'];
}
/**
* Sets sender
*
* @param \SendinBlue\Client\Model\GetExtendedCampaignOverviewSender $sender sender
*
* @return $this
*/
public function setSender($sender)
{
$this->container['sender'] = $sender;
return $this;
}
/**
* Gets replyTo
*
* @return string
*/
public function getReplyTo()
{
return $this->container['replyTo'];
}
/**
* Sets replyTo
*
* @param string $replyTo Email defined as the \"Reply to\" of the campaign
*
* @return $this
*/
public function setReplyTo($replyTo)
{
$this->container['replyTo'] = $replyTo;
return $this;
}
/**
* Gets toField
*
* @return string
*/
public function getToField()
{
return $this->container['toField'];
}
/**
* Sets toField
*
* @param string $toField Customisation of the \"to\" field of the campaign
*
* @return $this
*/
public function setToField($toField)
{
$this->container['toField'] = $toField;
return $this;
}
/**
* Gets htmlContent
*
* @return string
*/
public function getHtmlContent()
{
return $this->container['htmlContent'];
}
/**
* Sets htmlContent
*
* @param string $htmlContent HTML content of the campaign
*
* @return $this
*/
public function setHtmlContent($htmlContent)
{
$this->container['htmlContent'] = $htmlContent;
return $this;
}
/**
* Gets shareLink
*
* @return string
*/
public function getShareLink()
{
return $this->container['shareLink'];
}
/**
* Sets shareLink
*
* @param string $shareLink Link to share the campaign on social medias
*
* @return $this
*/
public function setShareLink($shareLink)
{
$this->container['shareLink'] = $shareLink;
return $this;
}
/**
* Gets tag
*
* @return string
*/
public function getTag()
{
return $this->container['tag'];
}
/**
* Sets tag
*
* @param string $tag Tag of the campaign
*
* @return $this
*/
public function setTag($tag)
{
$this->container['tag'] = $tag;
return $this;
}
/**
* Gets createdAt
*
* @return \DateTime
*/
public function getCreatedAt()
{
return $this->container['createdAt'];
}
/**
* Sets createdAt
*
* @param \DateTime $createdAt Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)
*
* @return $this
*/
public function setCreatedAt($createdAt)
{
$this->container['createdAt'] = $createdAt;
return $this;
}
/**
* Gets modifiedAt
*
* @return \DateTime
*/
public function getModifiedAt()
{
return $this->container['modifiedAt'];
}
/**
* Sets modifiedAt
*
* @param \DateTime $modifiedAt UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)
*
* @return $this
*/
public function setModifiedAt($modifiedAt)
{
$this->container['modifiedAt'] = $modifiedAt;
return $this;
}
/**
* Gets inlineImageActivation
*
* @return bool
*/
public function getInlineImageActivation()
{
return $this->container['inlineImageActivation'];
}
/**
* Sets inlineImageActivation
*
* @param bool $inlineImageActivation Status of inline image. inlineImageActivation = false means image cant be embedded, & inlineImageActivation = true means image can be embedded, in the email.
*
* @return $this
*/
public function setInlineImageActivation($inlineImageActivation)
{
$this->container['inlineImageActivation'] = $inlineImageActivation;
return $this;
}
/**
* Gets mirrorActive
*
* @return bool
*/
public function getMirrorActive()
{
return $this->container['mirrorActive'];
}
/**
* Sets mirrorActive
*
* @param bool $mirrorActive Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign
*
* @return $this
*/
public function setMirrorActive($mirrorActive)
{
$this->container['mirrorActive'] = $mirrorActive;
return $this;
}
/**
* Gets recurring
*
* @return bool
*/
public function getRecurring()
{
return $this->container['recurring'];
}
/**
* Sets recurring
*
* @param bool $recurring FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times
*
* @return $this
*/
public function setRecurring($recurring)
{
$this->container['recurring'] = $recurring;
return $this;
}
/**
* Gets sentDate
*
* @return \DateTime
*/
public function getSentDate()
{
return $this->container['sentDate'];
}
/**
* Sets sentDate
*
* @param \DateTime $sentDate Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent'
*
* @return $this
*/
public function setSentDate($sentDate)
{
$this->container['sentDate'] = $sentDate;
return $this;
}
/**
* Gets returnBounce
*
* @return int
*/
public function getReturnBounce()
{
return $this->container['returnBounce'];
}
/**
* Sets returnBounce
*
* @param int $returnBounce Total number of non-delivered campaigns for a particular campaign id.
*
* @return $this
*/
public function setReturnBounce($returnBounce)
{
$this->container['returnBounce'] = $returnBounce;
return $this;
}
/**
* 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));
}
}

View File

@ -0,0 +1,298 @@
<?php
/**
* GetExtendedCampaignOverviewSender
*
* 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;
/**
* GetExtendedCampaignOverviewSender Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetExtendedCampaignOverviewSender implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getExtendedCampaignOverview_sender';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['name' => 'string', 'email' => 'string', 'id' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['name' => null, 'email' => 'email', 'id' => null];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerTypes()
{
return self::$swaggerTypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerFormats()
{
return self::$swaggerFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = ['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 Sender name of the campaign
*
* @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 of the campaign
*
* @return $this
*/
public function setEmail($email)
{
$this->container['email'] = $email;
return $this;
}
/**
* Gets id
*
* @return string
*/
public function getId()
{
return $this->container['id'];
}
/**
* Sets id
*
* @param string $id Sender id of the campaign
*
* @return $this
*/
public function setId($id)
{
$this->container['id'] = $id;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
{
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
{
if (\is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
{
unset($this->container[$offset]);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (\defined('JSON_PRETTY_PRINT')) {
// use JSON pretty print
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -0,0 +1,432 @@
<?php
/**
* GetExtendedCampaignStats
*
* 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;
/**
* GetExtendedCampaignStats Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetExtendedCampaignStats implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getExtendedCampaignStats';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['globalStats' => 'object', 'campaignStats' => 'object[]', 'mirrorClick' => 'int', 'remaining' => 'int', 'linksStats' => 'object', 'statsByDomain' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetStatsByDomain', 'statsByDevice' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetStatsByDevice', 'statsByBrowser' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetStatsByBrowser'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['globalStats' => null, 'campaignStats' => null, 'mirrorClick' => 'int64', 'remaining' => 'int64', 'linksStats' => null, 'statsByDomain' => null, 'statsByDevice' => null, 'statsByBrowser' => 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 = ['globalStats' => 'globalStats', 'campaignStats' => 'campaignStats', 'mirrorClick' => 'mirrorClick', 'remaining' => 'remaining', 'linksStats' => 'linksStats', 'statsByDomain' => 'statsByDomain', 'statsByDevice' => 'statsByDevice', 'statsByBrowser' => 'statsByBrowser'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['globalStats' => 'setGlobalStats', 'campaignStats' => 'setCampaignStats', 'mirrorClick' => 'setMirrorClick', 'remaining' => 'setRemaining', 'linksStats' => 'setLinksStats', 'statsByDomain' => 'setStatsByDomain', 'statsByDevice' => 'setStatsByDevice', 'statsByBrowser' => 'setStatsByBrowser'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['globalStats' => 'getGlobalStats', 'campaignStats' => 'getCampaignStats', 'mirrorClick' => 'getMirrorClick', 'remaining' => 'getRemaining', 'linksStats' => 'getLinksStats', 'statsByDomain' => 'getStatsByDomain', 'statsByDevice' => 'getStatsByDevice', 'statsByBrowser' => 'getStatsByBrowser'];
/**
* 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['globalStats'] = isset($data['globalStats']) ? $data['globalStats'] : null;
$this->container['campaignStats'] = isset($data['campaignStats']) ? $data['campaignStats'] : null;
$this->container['mirrorClick'] = isset($data['mirrorClick']) ? $data['mirrorClick'] : null;
$this->container['remaining'] = isset($data['remaining']) ? $data['remaining'] : null;
$this->container['linksStats'] = isset($data['linksStats']) ? $data['linksStats'] : null;
$this->container['statsByDomain'] = isset($data['statsByDomain']) ? $data['statsByDomain'] : null;
$this->container['statsByDevice'] = isset($data['statsByDevice']) ? $data['statsByDevice'] : null;
$this->container['statsByBrowser'] = isset($data['statsByBrowser']) ? $data['statsByBrowser'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['globalStats'] === null) {
$invalidProperties[] = "'globalStats' can't be null";
}
if ($this->container['campaignStats'] === null) {
$invalidProperties[] = "'campaignStats' can't be null";
}
if ($this->container['mirrorClick'] === null) {
$invalidProperties[] = "'mirrorClick' can't be null";
}
if ($this->container['remaining'] === null) {
$invalidProperties[] = "'remaining' can't be null";
}
if ($this->container['linksStats'] === null) {
$invalidProperties[] = "'linksStats' can't be null";
}
if ($this->container['statsByDomain'] === null) {
$invalidProperties[] = "'statsByDomain' can't be null";
}
if ($this->container['statsByDevice'] === null) {
$invalidProperties[] = "'statsByDevice' can't be null";
}
if ($this->container['statsByBrowser'] === null) {
$invalidProperties[] = "'statsByBrowser' 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 globalStats
*
* @return object
*/
public function getGlobalStats()
{
return $this->container['globalStats'];
}
/**
* Sets globalStats
*
* @param object $globalStats Overall statistics of the campaign
*
* @return $this
*/
public function setGlobalStats($globalStats)
{
$this->container['globalStats'] = $globalStats;
return $this;
}
/**
* Gets campaignStats
*
* @return object[]
*/
public function getCampaignStats()
{
return $this->container['campaignStats'];
}
/**
* Sets campaignStats
*
* @param object[] $campaignStats List-wise statistics of the campaign.
*
* @return $this
*/
public function setCampaignStats($campaignStats)
{
$this->container['campaignStats'] = $campaignStats;
return $this;
}
/**
* Gets mirrorClick
*
* @return int
*/
public function getMirrorClick()
{
return $this->container['mirrorClick'];
}
/**
* Sets mirrorClick
*
* @param int $mirrorClick Number of clicks on mirror link
*
* @return $this
*/
public function setMirrorClick($mirrorClick)
{
$this->container['mirrorClick'] = $mirrorClick;
return $this;
}
/**
* Gets remaining
*
* @return int
*/
public function getRemaining()
{
return $this->container['remaining'];
}
/**
* Sets remaining
*
* @param int $remaining Number of remaning emails to send
*
* @return $this
*/
public function setRemaining($remaining)
{
$this->container['remaining'] = $remaining;
return $this;
}
/**
* Gets linksStats
*
* @return object
*/
public function getLinksStats()
{
return $this->container['linksStats'];
}
/**
* Sets linksStats
*
* @param object $linksStats Statistics about the number of clicks for the links
*
* @return $this
*/
public function setLinksStats($linksStats)
{
$this->container['linksStats'] = $linksStats;
return $this;
}
/**
* Gets statsByDomain
*
* @return \SendinBlue\Client\Model\GetStatsByDomain
*/
public function getStatsByDomain()
{
return $this->container['statsByDomain'];
}
/**
* Sets statsByDomain
*
* @param \SendinBlue\Client\Model\GetStatsByDomain $statsByDomain statsByDomain
*
* @return $this
*/
public function setStatsByDomain($statsByDomain)
{
$this->container['statsByDomain'] = $statsByDomain;
return $this;
}
/**
* Gets statsByDevice
*
* @return \SendinBlue\Client\Model\GetStatsByDevice
*/
public function getStatsByDevice()
{
return $this->container['statsByDevice'];
}
/**
* Sets statsByDevice
*
* @param \SendinBlue\Client\Model\GetStatsByDevice $statsByDevice Statistics about the campaign on the basis of various devices
*
* @return $this
*/
public function setStatsByDevice($statsByDevice)
{
$this->container['statsByDevice'] = $statsByDevice;
return $this;
}
/**
* Gets statsByBrowser
*
* @return \SendinBlue\Client\Model\GetStatsByBrowser
*/
public function getStatsByBrowser()
{
return $this->container['statsByBrowser'];
}
/**
* Sets statsByBrowser
*
* @param \SendinBlue\Client\Model\GetStatsByBrowser $statsByBrowser Statistics about the campaign on the basis of various browsers
*
* @return $this
*/
public function setStatsByBrowser($statsByBrowser)
{
$this->container['statsByBrowser'] = $statsByBrowser;
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));
}
}

View File

@ -0,0 +1,357 @@
<?php
/**
* GetExtendedClient
*
* 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;
/**
* GetExtendedClient Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetExtendedClient implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getExtendedClient';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['email' => 'string', 'firstName' => 'string', 'lastName' => 'string', 'companyName' => 'string', 'address' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetExtendedClientAddress'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['email' => 'email', 'firstName' => null, 'lastName' => null, 'companyName' => null, 'address' => null];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerTypes()
{
return self::$swaggerTypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerFormats()
{
return self::$swaggerFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = ['email' => 'email', 'firstName' => 'firstName', 'lastName' => 'lastName', 'companyName' => 'companyName', 'address' => 'address'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['email' => 'setEmail', 'firstName' => 'setFirstName', 'lastName' => 'setLastName', 'companyName' => 'setCompanyName', 'address' => 'setAddress'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['email' => 'getEmail', 'firstName' => 'getFirstName', 'lastName' => 'getLastName', 'companyName' => 'getCompanyName', 'address' => 'getAddress'];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$swaggerModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['email'] = isset($data['email']) ? $data['email'] : null;
$this->container['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['address'] = isset($data['address']) ? $data['address'] : 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['address'] === null) {
$invalidProperties[] = "'address' 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 Login Email
*
* @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
*
* @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
*
* @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 Name of the company
*
* @return $this
*/
public function setCompanyName($companyName)
{
$this->container['companyName'] = $companyName;
return $this;
}
/**
* Gets address
*
* @return \SendinBlue\Client\Model\GetExtendedClientAddress
*/
public function getAddress()
{
return $this->container['address'];
}
/**
* Sets address
*
* @param \SendinBlue\Client\Model\GetExtendedClientAddress $address address
*
* @return $this
*/
public function setAddress($address)
{
$this->container['address'] = $address;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
{
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
{
if (\is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
{
unset($this->container[$offset]);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (\defined('JSON_PRETTY_PRINT')) {
// use JSON pretty print
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -0,0 +1,333 @@
<?php
/**
* GetExtendedClientAddress
*
* 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;
/**
* GetExtendedClientAddress Class Doc Comment
*
* @category Class
* @description Address informations
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetExtendedClientAddress implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getExtendedClient_address';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['street' => 'string', 'city' => 'string', 'zipCode' => 'string', 'country' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['street' => null, 'city' => null, 'zipCode' => null, 'country' => 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 = ['street' => 'street', 'city' => 'city', 'zipCode' => 'zipCode', 'country' => 'country'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['street' => 'setStreet', 'city' => 'setCity', 'zipCode' => 'setZipCode', 'country' => 'setCountry'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['street' => 'getStreet', 'city' => 'getCity', 'zipCode' => 'getZipCode', 'country' => 'getCountry'];
/**
* 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['street'] = isset($data['street']) ? $data['street'] : null;
$this->container['city'] = isset($data['city']) ? $data['city'] : null;
$this->container['zipCode'] = isset($data['zipCode']) ? $data['zipCode'] : null;
$this->container['country'] = isset($data['country']) ? $data['country'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['street'] === null) {
$invalidProperties[] = "'street' can't be null";
}
if ($this->container['city'] === null) {
$invalidProperties[] = "'city' can't be null";
}
if ($this->container['zipCode'] === null) {
$invalidProperties[] = "'zipCode' can't be null";
}
if ($this->container['country'] === null) {
$invalidProperties[] = "'country' 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 street
*
* @return string
*/
public function getStreet()
{
return $this->container['street'];
}
/**
* Sets street
*
* @param string $street Street information
*
* @return $this
*/
public function setStreet($street)
{
$this->container['street'] = $street;
return $this;
}
/**
* Gets city
*
* @return string
*/
public function getCity()
{
return $this->container['city'];
}
/**
* Sets city
*
* @param string $city City information
*
* @return $this
*/
public function setCity($city)
{
$this->container['city'] = $city;
return $this;
}
/**
* Gets zipCode
*
* @return string
*/
public function getZipCode()
{
return $this->container['zipCode'];
}
/**
* Sets zipCode
*
* @param string $zipCode Zip Code information
*
* @return $this
*/
public function setZipCode($zipCode)
{
$this->container['zipCode'] = $zipCode;
return $this;
}
/**
* Gets country
*
* @return string
*/
public function getCountry()
{
return $this->container['country'];
}
/**
* Sets country
*
* @param string $country Country information
*
* @return $this
*/
public function setCountry($country)
{
$this->container['country'] = $country;
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));
}
}

View File

@ -0,0 +1,479 @@
<?php
/**
* GetExtendedContactDetails
*
* 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;
/**
* GetExtendedContactDetails Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetExtendedContactDetails implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getExtendedContactDetails';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['email' => 'string', 'id' => 'int', 'emailBlacklisted' => 'bool', 'smsBlacklisted' => 'bool', 'createdAt' => '\\DateTime', 'modifiedAt' => '\\DateTime', 'listIds' => 'int[]', 'listUnsubscribed' => 'int[]', 'attributes' => 'object', 'statistics' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetExtendedContactDetailsStatistics'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['email' => 'email', 'id' => 'int64', 'emailBlacklisted' => null, 'smsBlacklisted' => null, 'createdAt' => 'date-time', 'modifiedAt' => 'date-time', 'listIds' => 'int64', 'listUnsubscribed' => 'int64', 'attributes' => null, 'statistics' => 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', 'id' => 'id', 'emailBlacklisted' => 'emailBlacklisted', 'smsBlacklisted' => 'smsBlacklisted', 'createdAt' => 'createdAt', 'modifiedAt' => 'modifiedAt', 'listIds' => 'listIds', 'listUnsubscribed' => 'listUnsubscribed', 'attributes' => 'attributes', 'statistics' => 'statistics'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['email' => 'setEmail', 'id' => 'setId', 'emailBlacklisted' => 'setEmailBlacklisted', 'smsBlacklisted' => 'setSmsBlacklisted', 'createdAt' => 'setCreatedAt', 'modifiedAt' => 'setModifiedAt', 'listIds' => 'setListIds', 'listUnsubscribed' => 'setListUnsubscribed', 'attributes' => 'setAttributes', 'statistics' => 'setStatistics'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['email' => 'getEmail', 'id' => 'getId', 'emailBlacklisted' => 'getEmailBlacklisted', 'smsBlacklisted' => 'getSmsBlacklisted', 'createdAt' => 'getCreatedAt', 'modifiedAt' => 'getModifiedAt', 'listIds' => 'getListIds', 'listUnsubscribed' => 'getListUnsubscribed', 'attributes' => 'getAttributes', 'statistics' => 'getStatistics'];
/**
* 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['id'] = isset($data['id']) ? $data['id'] : null;
$this->container['emailBlacklisted'] = isset($data['emailBlacklisted']) ? $data['emailBlacklisted'] : null;
$this->container['smsBlacklisted'] = isset($data['smsBlacklisted']) ? $data['smsBlacklisted'] : null;
$this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null;
$this->container['modifiedAt'] = isset($data['modifiedAt']) ? $data['modifiedAt'] : null;
$this->container['listIds'] = isset($data['listIds']) ? $data['listIds'] : null;
$this->container['listUnsubscribed'] = isset($data['listUnsubscribed']) ? $data['listUnsubscribed'] : null;
$this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null;
$this->container['statistics'] = isset($data['statistics']) ? $data['statistics'] : 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['id'] === null) {
$invalidProperties[] = "'id' can't be null";
}
if ($this->container['emailBlacklisted'] === null) {
$invalidProperties[] = "'emailBlacklisted' can't be null";
}
if ($this->container['smsBlacklisted'] === null) {
$invalidProperties[] = "'smsBlacklisted' can't be null";
}
if ($this->container['createdAt'] === null) {
$invalidProperties[] = "'createdAt' can't be null";
}
if ($this->container['modifiedAt'] === null) {
$invalidProperties[] = "'modifiedAt' can't be null";
}
if ($this->container['listIds'] === null) {
$invalidProperties[] = "'listIds' can't be null";
}
if ($this->container['attributes'] === null) {
$invalidProperties[] = "'attributes' can't be null";
}
if ($this->container['statistics'] === null) {
$invalidProperties[] = "'statistics' can't be null";
}
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @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 contact for which you requested the details
*
* @return $this
*/
public function setEmail($email)
{
$this->container['email'] = $email;
return $this;
}
/**
* Gets id
*
* @return int
*/
public function getId()
{
return $this->container['id'];
}
/**
* Sets id
*
* @param int $id ID of the contact for which you requested the details
*
* @return $this
*/
public function setId($id)
{
$this->container['id'] = $id;
return $this;
}
/**
* Gets emailBlacklisted
*
* @return bool
*/
public function getEmailBlacklisted()
{
return $this->container['emailBlacklisted'];
}
/**
* Sets emailBlacklisted
*
* @param bool $emailBlacklisted Blacklist status for email campaigns (true=blacklisted, false=not blacklisted)
*
* @return $this
*/
public function setEmailBlacklisted($emailBlacklisted)
{
$this->container['emailBlacklisted'] = $emailBlacklisted;
return $this;
}
/**
* Gets smsBlacklisted
*
* @return bool
*/
public function getSmsBlacklisted()
{
return $this->container['smsBlacklisted'];
}
/**
* Sets smsBlacklisted
*
* @param bool $smsBlacklisted Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted)
*
* @return $this
*/
public function setSmsBlacklisted($smsBlacklisted)
{
$this->container['smsBlacklisted'] = $smsBlacklisted;
return $this;
}
/**
* Gets createdAt
*
* @return \DateTime
*/
public function getCreatedAt()
{
return $this->container['createdAt'];
}
/**
* Sets createdAt
*
* @param \DateTime $createdAt Creation UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ)
*
* @return $this
*/
public function setCreatedAt($createdAt)
{
$this->container['createdAt'] = $createdAt;
return $this;
}
/**
* Gets modifiedAt
*
* @return \DateTime
*/
public function getModifiedAt()
{
return $this->container['modifiedAt'];
}
/**
* Sets modifiedAt
*
* @param \DateTime $modifiedAt Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ)
*
* @return $this
*/
public function setModifiedAt($modifiedAt)
{
$this->container['modifiedAt'] = $modifiedAt;
return $this;
}
/**
* Gets listIds
*
* @return int[]
*/
public function getListIds()
{
return $this->container['listIds'];
}
/**
* Sets listIds
*
* @param int[] $listIds listIds
*
* @return $this
*/
public function setListIds($listIds)
{
$this->container['listIds'] = $listIds;
return $this;
}
/**
* Gets listUnsubscribed
*
* @return int[]
*/
public function getListUnsubscribed()
{
return $this->container['listUnsubscribed'];
}
/**
* Sets listUnsubscribed
*
* @param int[] $listUnsubscribed listUnsubscribed
*
* @return $this
*/
public function setListUnsubscribed($listUnsubscribed)
{
$this->container['listUnsubscribed'] = $listUnsubscribed;
return $this;
}
/**
* Gets attributes
*
* @return object
*/
public function getAttributes()
{
return $this->container['attributes'];
}
/**
* Sets attributes
*
* @param object $attributes Set of attributes of the contact
*
* @return $this
*/
public function setAttributes($attributes)
{
$this->container['attributes'] = $attributes;
return $this;
}
/**
* Gets statistics
*
* @return \SendinBlue\Client\Model\GetExtendedContactDetailsStatistics
*/
public function getStatistics()
{
return $this->container['statistics'];
}
/**
* Sets statistics
*
* @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatistics $statistics statistics
*
* @return $this
*/
public function setStatistics($statistics)
{
$this->container['statistics'] = $statistics;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
{
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
{
if (\is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
{
unset($this->container[$offset]);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (\defined('JSON_PRETTY_PRINT')) {
// use JSON pretty print
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -0,0 +1,409 @@
<?php
/**
* GetExtendedContactDetailsStatistics
*
* 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;
/**
* GetExtendedContactDetailsStatistics Class Doc Comment
*
* @category Class
* @description Campaign statistics of the contact
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetExtendedContactDetailsStatistics implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getExtendedContactDetails_statistics';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['messagesSent' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetExtendedContactDetailsStatisticsMessagesSent[]', 'hardBounces' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetExtendedContactDetailsStatisticsMessagesSent[]', 'softBounces' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetExtendedContactDetailsStatisticsMessagesSent[]', 'complaints' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetExtendedContactDetailsStatisticsMessagesSent[]', 'unsubscriptions' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetExtendedContactDetailsStatisticsUnsubscriptions', 'opened' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetExtendedContactDetailsStatisticsOpened[]', 'clicked' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetExtendedContactDetailsStatisticsClicked[]', 'transacAttributes' => 'object[]'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['messagesSent' => null, 'hardBounces' => null, 'softBounces' => null, 'complaints' => null, 'unsubscriptions' => null, 'opened' => null, 'clicked' => null, 'transacAttributes' => 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 = ['messagesSent' => 'messagesSent', 'hardBounces' => 'hardBounces', 'softBounces' => 'softBounces', 'complaints' => 'complaints', 'unsubscriptions' => 'unsubscriptions', 'opened' => 'opened', 'clicked' => 'clicked', 'transacAttributes' => 'transacAttributes'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['messagesSent' => 'setMessagesSent', 'hardBounces' => 'setHardBounces', 'softBounces' => 'setSoftBounces', 'complaints' => 'setComplaints', 'unsubscriptions' => 'setUnsubscriptions', 'opened' => 'setOpened', 'clicked' => 'setClicked', 'transacAttributes' => 'setTransacAttributes'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['messagesSent' => 'getMessagesSent', 'hardBounces' => 'getHardBounces', 'softBounces' => 'getSoftBounces', 'complaints' => 'getComplaints', 'unsubscriptions' => 'getUnsubscriptions', 'opened' => 'getOpened', 'clicked' => 'getClicked', 'transacAttributes' => 'getTransacAttributes'];
/**
* 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['messagesSent'] = isset($data['messagesSent']) ? $data['messagesSent'] : null;
$this->container['hardBounces'] = isset($data['hardBounces']) ? $data['hardBounces'] : null;
$this->container['softBounces'] = isset($data['softBounces']) ? $data['softBounces'] : null;
$this->container['complaints'] = isset($data['complaints']) ? $data['complaints'] : null;
$this->container['unsubscriptions'] = isset($data['unsubscriptions']) ? $data['unsubscriptions'] : null;
$this->container['opened'] = isset($data['opened']) ? $data['opened'] : null;
$this->container['clicked'] = isset($data['clicked']) ? $data['clicked'] : null;
$this->container['transacAttributes'] = isset($data['transacAttributes']) ? $data['transacAttributes'] : null;
}
/**
* 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 messagesSent
*
* @return \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]
*/
public function getMessagesSent()
{
return $this->container['messagesSent'];
}
/**
* Sets messagesSent
*
* @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] $messagesSent Listing of the sent campaign for the contact
*
* @return $this
*/
public function setMessagesSent($messagesSent)
{
$this->container['messagesSent'] = $messagesSent;
return $this;
}
/**
* Gets hardBounces
*
* @return \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]
*/
public function getHardBounces()
{
return $this->container['hardBounces'];
}
/**
* Sets hardBounces
*
* @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] $hardBounces Listing of the hardbounes generated by the contact
*
* @return $this
*/
public function setHardBounces($hardBounces)
{
$this->container['hardBounces'] = $hardBounces;
return $this;
}
/**
* Gets softBounces
*
* @return \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]
*/
public function getSoftBounces()
{
return $this->container['softBounces'];
}
/**
* Sets softBounces
*
* @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] $softBounces Listing of the softbounes generated by the contact
*
* @return $this
*/
public function setSoftBounces($softBounces)
{
$this->container['softBounces'] = $softBounces;
return $this;
}
/**
* Gets complaints
*
* @return \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[]
*/
public function getComplaints()
{
return $this->container['complaints'];
}
/**
* Sets complaints
*
* @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsMessagesSent[] $complaints Listing of the complaints generated by the contact
*
* @return $this
*/
public function setComplaints($complaints)
{
$this->container['complaints'] = $complaints;
return $this;
}
/**
* Gets unsubscriptions
*
* @return \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptions
*/
public function getUnsubscriptions()
{
return $this->container['unsubscriptions'];
}
/**
* Sets unsubscriptions
*
* @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptions $unsubscriptions unsubscriptions
*
* @return $this
*/
public function setUnsubscriptions($unsubscriptions)
{
$this->container['unsubscriptions'] = $unsubscriptions;
return $this;
}
/**
* Gets opened
*
* @return \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsOpened[]
*/
public function getOpened()
{
return $this->container['opened'];
}
/**
* Sets opened
*
* @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsOpened[] $opened Listing of the openings generated by the contact
*
* @return $this
*/
public function setOpened($opened)
{
$this->container['opened'] = $opened;
return $this;
}
/**
* Gets clicked
*
* @return \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsClicked[]
*/
public function getClicked()
{
return $this->container['clicked'];
}
/**
* Sets clicked
*
* @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsClicked[] $clicked Listing of the clicks generated by the contact
*
* @return $this
*/
public function setClicked($clicked)
{
$this->container['clicked'] = $clicked;
return $this;
}
/**
* Gets transacAttributes
*
* @return object[]
*/
public function getTransacAttributes()
{
return $this->container['transacAttributes'];
}
/**
* Sets transacAttributes
*
* @param object[] $transacAttributes Listing of the transactional attributes for the contact
*
* @return $this
*/
public function setTransacAttributes($transacAttributes)
{
$this->container['transacAttributes'] = $transacAttributes;
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));
}
}

View File

@ -0,0 +1,282 @@
<?php
/**
* GetExtendedContactDetailsStatisticsClicked
*
* 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;
/**
* GetExtendedContactDetailsStatisticsClicked Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetExtendedContactDetailsStatisticsClicked implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getExtendedContactDetails_statistics_clicked';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['campaignId' => 'int', 'links' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetExtendedContactDetailsStatisticsLinks[]'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['campaignId' => 'int64', 'links' => null];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerTypes()
{
return self::$swaggerTypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerFormats()
{
return self::$swaggerFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = ['campaignId' => 'campaignId', 'links' => 'links'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['campaignId' => 'setCampaignId', 'links' => 'setLinks'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['campaignId' => 'getCampaignId', 'links' => 'getLinks'];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$swaggerModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['campaignId'] = isset($data['campaignId']) ? $data['campaignId'] : null;
$this->container['links'] = isset($data['links']) ? $data['links'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['campaignId'] === null) {
$invalidProperties[] = "'campaignId' can't be null";
}
if ($this->container['links'] === null) {
$invalidProperties[] = "'links' can't be null";
}
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return \count($this->listInvalidProperties()) === 0;
}
/**
* Gets campaignId
*
* @return int
*/
public function getCampaignId()
{
return $this->container['campaignId'];
}
/**
* Sets campaignId
*
* @param int $campaignId ID of the campaign which generated the event
*
* @return $this
*/
public function setCampaignId($campaignId)
{
$this->container['campaignId'] = $campaignId;
return $this;
}
/**
* Gets links
*
* @return \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsLinks[]
*/
public function getLinks()
{
return $this->container['links'];
}
/**
* Sets links
*
* @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsLinks[] $links Listing of the clicked links for the campaign
*
* @return $this
*/
public function setLinks($links)
{
$this->container['links'] = $links;
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));
}
}

View File

@ -0,0 +1,332 @@
<?php
/**
* GetExtendedContactDetailsStatisticsLinks
*
* 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;
/**
* GetExtendedContactDetailsStatisticsLinks Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetExtendedContactDetailsStatisticsLinks implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getExtendedContactDetails_statistics_links';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['count' => 'int', 'eventTime' => '\\DateTime', 'ip' => 'string', 'url' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['count' => 'int64', 'eventTime' => 'date-time', 'ip' => null, 'url' => null];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerTypes()
{
return self::$swaggerTypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerFormats()
{
return self::$swaggerFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = ['count' => 'count', 'eventTime' => 'eventTime', 'ip' => 'ip', 'url' => 'url'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['count' => 'setCount', 'eventTime' => 'setEventTime', 'ip' => 'setIp', 'url' => 'setUrl'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['count' => 'getCount', 'eventTime' => 'getEventTime', 'ip' => 'getIp', 'url' => 'getUrl'];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$swaggerModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['count'] = isset($data['count']) ? $data['count'] : null;
$this->container['eventTime'] = isset($data['eventTime']) ? $data['eventTime'] : null;
$this->container['ip'] = isset($data['ip']) ? $data['ip'] : null;
$this->container['url'] = isset($data['url']) ? $data['url'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['count'] === null) {
$invalidProperties[] = "'count' can't be null";
}
if ($this->container['eventTime'] === null) {
$invalidProperties[] = "'eventTime' can't be null";
}
if ($this->container['ip'] === null) {
$invalidProperties[] = "'ip' can't be null";
}
if ($this->container['url'] === null) {
$invalidProperties[] = "'url' 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 count
*
* @return int
*/
public function getCount()
{
return $this->container['count'];
}
/**
* Sets count
*
* @param int $count Number of clicks on this link for the campaign
*
* @return $this
*/
public function setCount($count)
{
$this->container['count'] = $count;
return $this;
}
/**
* Gets eventTime
*
* @return \DateTime
*/
public function getEventTime()
{
return $this->container['eventTime'];
}
/**
* Sets eventTime
*
* @param \DateTime $eventTime UTC date-time of the event
*
* @return $this
*/
public function setEventTime($eventTime)
{
$this->container['eventTime'] = $eventTime;
return $this;
}
/**
* Gets ip
*
* @return string
*/
public function getIp()
{
return $this->container['ip'];
}
/**
* Sets ip
*
* @param string $ip IP from which the user has clicked on the link
*
* @return $this
*/
public function setIp($ip)
{
$this->container['ip'] = $ip;
return $this;
}
/**
* Gets url
*
* @return string
*/
public function getUrl()
{
return $this->container['url'];
}
/**
* Sets url
*
* @param string $url URL of the clicked link
*
* @return $this
*/
public function setUrl($url)
{
$this->container['url'] = $url;
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));
}
}

View File

@ -0,0 +1,282 @@
<?php
/**
* GetExtendedContactDetailsStatisticsMessagesSent
*
* 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;
/**
* GetExtendedContactDetailsStatisticsMessagesSent Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetExtendedContactDetailsStatisticsMessagesSent implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getExtendedContactDetails_statistics_messagesSent';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['campaignId' => 'int', 'eventTime' => '\\DateTime'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['campaignId' => 'int64', 'eventTime' => '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 = ['campaignId' => 'campaignId', 'eventTime' => 'eventTime'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['campaignId' => 'setCampaignId', 'eventTime' => 'setEventTime'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['campaignId' => 'getCampaignId', 'eventTime' => 'getEventTime'];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$swaggerModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['campaignId'] = isset($data['campaignId']) ? $data['campaignId'] : null;
$this->container['eventTime'] = isset($data['eventTime']) ? $data['eventTime'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['campaignId'] === null) {
$invalidProperties[] = "'campaignId' can't be null";
}
if ($this->container['eventTime'] === null) {
$invalidProperties[] = "'eventTime' can't be null";
}
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return \count($this->listInvalidProperties()) === 0;
}
/**
* Gets campaignId
*
* @return int
*/
public function getCampaignId()
{
return $this->container['campaignId'];
}
/**
* Sets campaignId
*
* @param int $campaignId ID of the campaign which generated the event
*
* @return $this
*/
public function setCampaignId($campaignId)
{
$this->container['campaignId'] = $campaignId;
return $this;
}
/**
* Gets eventTime
*
* @return \DateTime
*/
public function getEventTime()
{
return $this->container['eventTime'];
}
/**
* Sets eventTime
*
* @param \DateTime $eventTime UTC date-time of the event
*
* @return $this
*/
public function setEventTime($eventTime)
{
$this->container['eventTime'] = $eventTime;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
{
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
{
if (\is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
{
unset($this->container[$offset]);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (\defined('JSON_PRETTY_PRINT')) {
// use JSON pretty print
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this), \JSON_PRETTY_PRINT);
}
return \json_encode(\WPMailSMTP\Vendor\SendinBlue\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -0,0 +1,332 @@
<?php
/**
* GetExtendedContactDetailsStatisticsOpened
*
* 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;
/**
* GetExtendedContactDetailsStatisticsOpened Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetExtendedContactDetailsStatisticsOpened implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getExtendedContactDetails_statistics_opened';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['campaignId' => 'int', 'count' => 'int', 'eventTime' => '\\DateTime', 'ip' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['campaignId' => 'int64', 'count' => 'int64', 'eventTime' => 'date-time', 'ip' => null];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerTypes()
{
return self::$swaggerTypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerFormats()
{
return self::$swaggerFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = ['campaignId' => 'campaignId', 'count' => 'count', 'eventTime' => 'eventTime', 'ip' => 'ip'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['campaignId' => 'setCampaignId', 'count' => 'setCount', 'eventTime' => 'setEventTime', 'ip' => 'setIp'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['campaignId' => 'getCampaignId', 'count' => 'getCount', 'eventTime' => 'getEventTime', 'ip' => 'getIp'];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$swaggerModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['campaignId'] = isset($data['campaignId']) ? $data['campaignId'] : null;
$this->container['count'] = isset($data['count']) ? $data['count'] : null;
$this->container['eventTime'] = isset($data['eventTime']) ? $data['eventTime'] : null;
$this->container['ip'] = isset($data['ip']) ? $data['ip'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['campaignId'] === null) {
$invalidProperties[] = "'campaignId' can't be null";
}
if ($this->container['count'] === null) {
$invalidProperties[] = "'count' can't be null";
}
if ($this->container['eventTime'] === null) {
$invalidProperties[] = "'eventTime' can't be null";
}
if ($this->container['ip'] === null) {
$invalidProperties[] = "'ip' can't be null";
}
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return \count($this->listInvalidProperties()) === 0;
}
/**
* Gets campaignId
*
* @return int
*/
public function getCampaignId()
{
return $this->container['campaignId'];
}
/**
* Sets campaignId
*
* @param int $campaignId ID of the campaign which generated the event
*
* @return $this
*/
public function setCampaignId($campaignId)
{
$this->container['campaignId'] = $campaignId;
return $this;
}
/**
* Gets count
*
* @return int
*/
public function getCount()
{
return $this->container['count'];
}
/**
* Sets count
*
* @param int $count Number of openings for the campaign
*
* @return $this
*/
public function setCount($count)
{
$this->container['count'] = $count;
return $this;
}
/**
* Gets eventTime
*
* @return \DateTime
*/
public function getEventTime()
{
return $this->container['eventTime'];
}
/**
* Sets eventTime
*
* @param \DateTime $eventTime UTC date-time of the event
*
* @return $this
*/
public function setEventTime($eventTime)
{
$this->container['eventTime'] = $eventTime;
return $this;
}
/**
* Gets ip
*
* @return string
*/
public function getIp()
{
return $this->container['ip'];
}
/**
* Sets ip
*
* @param string $ip IP from which the user has opened the email
*
* @return $this
*/
public function setIp($ip)
{
$this->container['ip'] = $ip;
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));
}
}

View File

@ -0,0 +1,283 @@
<?php
/**
* GetExtendedContactDetailsStatisticsUnsubscriptions
*
* 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;
/**
* GetExtendedContactDetailsStatisticsUnsubscriptions Class Doc Comment
*
* @category Class
* @description Listing of the unsubscription for the contact
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetExtendedContactDetailsStatisticsUnsubscriptions implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getExtendedContactDetails_statistics_unsubscriptions';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['userUnsubscription' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription[]', 'adminUnsubscription' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription[]'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['userUnsubscription' => null, 'adminUnsubscription' => 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 = ['userUnsubscription' => 'userUnsubscription', 'adminUnsubscription' => 'adminUnsubscription'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['userUnsubscription' => 'setUserUnsubscription', 'adminUnsubscription' => 'setAdminUnsubscription'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['userUnsubscription' => 'getUserUnsubscription', 'adminUnsubscription' => 'getAdminUnsubscription'];
/**
* 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['userUnsubscription'] = isset($data['userUnsubscription']) ? $data['userUnsubscription'] : null;
$this->container['adminUnsubscription'] = isset($data['adminUnsubscription']) ? $data['adminUnsubscription'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['userUnsubscription'] === null) {
$invalidProperties[] = "'userUnsubscription' can't be null";
}
if ($this->container['adminUnsubscription'] === null) {
$invalidProperties[] = "'adminUnsubscription' 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 userUnsubscription
*
* @return \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription[]
*/
public function getUserUnsubscription()
{
return $this->container['userUnsubscription'];
}
/**
* Sets userUnsubscription
*
* @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription[] $userUnsubscription Contact unsubscribe via unsubscription link in a campaign
*
* @return $this
*/
public function setUserUnsubscription($userUnsubscription)
{
$this->container['userUnsubscription'] = $userUnsubscription;
return $this;
}
/**
* Gets adminUnsubscription
*
* @return \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription[]
*/
public function getAdminUnsubscription()
{
return $this->container['adminUnsubscription'];
}
/**
* Sets adminUnsubscription
*
* @param \SendinBlue\Client\Model\GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription[] $adminUnsubscription Contact has been unsubscribed from the administrator
*
* @return $this
*/
public function setAdminUnsubscription($adminUnsubscription)
{
$this->container['adminUnsubscription'] = $adminUnsubscription;
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));
}
}

View File

@ -0,0 +1,282 @@
<?php
/**
* GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription
*
* 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;
/**
* GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getExtendedContactDetails_statistics_unsubscriptions_adminUnsubscription';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['eventTime' => '\\DateTime', 'ip' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['eventTime' => 'date-time', 'ip' => 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 = ['eventTime' => 'eventTime', 'ip' => 'ip'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['eventTime' => 'setEventTime', 'ip' => 'setIp'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['eventTime' => 'getEventTime', 'ip' => 'getIp'];
/**
* 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['eventTime'] = isset($data['eventTime']) ? $data['eventTime'] : null;
$this->container['ip'] = isset($data['ip']) ? $data['ip'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['eventTime'] === null) {
$invalidProperties[] = "'eventTime' can't be null";
}
if ($this->container['ip'] === null) {
$invalidProperties[] = "'ip' 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 eventTime
*
* @return \DateTime
*/
public function getEventTime()
{
return $this->container['eventTime'];
}
/**
* Sets eventTime
*
* @param \DateTime $eventTime UTC date-time of the event
*
* @return $this
*/
public function setEventTime($eventTime)
{
$this->container['eventTime'] = $eventTime;
return $this;
}
/**
* Gets ip
*
* @return string
*/
public function getIp()
{
return $this->container['ip'];
}
/**
* Sets ip
*
* @param string $ip IP from which the user has been unsubscribed
*
* @return $this
*/
public function setIp($ip)
{
$this->container['ip'] = $ip;
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));
}
}

View File

@ -0,0 +1,307 @@
<?php
/**
* GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription
*
* 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;
/**
* GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getExtendedContactDetails_statistics_unsubscriptions_userUnsubscription';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['campaignId' => 'int', 'eventTime' => '\\DateTime', 'ip' => 'string'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['campaignId' => 'int64', 'eventTime' => 'date-time', 'ip' => null];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerTypes()
{
return self::$swaggerTypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerFormats()
{
return self::$swaggerFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = ['campaignId' => 'campaignId', 'eventTime' => 'eventTime', 'ip' => 'ip'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['campaignId' => 'setCampaignId', 'eventTime' => 'setEventTime', 'ip' => 'setIp'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['campaignId' => 'getCampaignId', 'eventTime' => 'getEventTime', 'ip' => 'getIp'];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$swaggerModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['campaignId'] = isset($data['campaignId']) ? $data['campaignId'] : null;
$this->container['eventTime'] = isset($data['eventTime']) ? $data['eventTime'] : null;
$this->container['ip'] = isset($data['ip']) ? $data['ip'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['campaignId'] === null) {
$invalidProperties[] = "'campaignId' can't be null";
}
if ($this->container['eventTime'] === null) {
$invalidProperties[] = "'eventTime' can't be null";
}
if ($this->container['ip'] === null) {
$invalidProperties[] = "'ip' can't be null";
}
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return \count($this->listInvalidProperties()) === 0;
}
/**
* Gets campaignId
*
* @return int
*/
public function getCampaignId()
{
return $this->container['campaignId'];
}
/**
* Sets campaignId
*
* @param int $campaignId ID of the campaign which generated the event
*
* @return $this
*/
public function setCampaignId($campaignId)
{
$this->container['campaignId'] = $campaignId;
return $this;
}
/**
* Gets eventTime
*
* @return \DateTime
*/
public function getEventTime()
{
return $this->container['eventTime'];
}
/**
* Sets eventTime
*
* @param \DateTime $eventTime UTC date-time of the event
*
* @return $this
*/
public function setEventTime($eventTime)
{
$this->container['eventTime'] = $eventTime;
return $this;
}
/**
* Gets ip
*
* @return string
*/
public function getIp()
{
return $this->container['ip'];
}
/**
* Sets ip
*
* @param string $ip IP from which the user has unsubscribed
*
* @return $this
*/
public function setIp($ip)
{
$this->container['ip'] = $ip;
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));
}
}

View File

@ -0,0 +1,426 @@
<?php
/**
* GetExtendedList
*
* 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;
/**
* GetExtendedList Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetExtendedList implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getExtendedList';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['id' => 'int', 'name' => 'string', 'totalBlacklisted' => 'int', 'totalSubscribers' => 'int', 'folderId' => 'int', 'createdAt' => '\\DateTime', 'campaignStats' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetExtendedListCampaignStats[]', 'dynamicList' => 'bool'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['id' => 'int64', 'name' => null, 'totalBlacklisted' => 'int64', 'totalSubscribers' => 'int64', 'folderId' => 'int64', 'createdAt' => 'date-time', 'campaignStats' => null, 'dynamicList' => 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', 'totalBlacklisted' => 'totalBlacklisted', 'totalSubscribers' => 'totalSubscribers', 'folderId' => 'folderId', 'createdAt' => 'createdAt', 'campaignStats' => 'campaignStats', 'dynamicList' => 'dynamicList'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['id' => 'setId', 'name' => 'setName', 'totalBlacklisted' => 'setTotalBlacklisted', 'totalSubscribers' => 'setTotalSubscribers', 'folderId' => 'setFolderId', 'createdAt' => 'setCreatedAt', 'campaignStats' => 'setCampaignStats', 'dynamicList' => 'setDynamicList'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['id' => 'getId', 'name' => 'getName', 'totalBlacklisted' => 'getTotalBlacklisted', 'totalSubscribers' => 'getTotalSubscribers', 'folderId' => 'getFolderId', 'createdAt' => 'getCreatedAt', 'campaignStats' => 'getCampaignStats', 'dynamicList' => 'getDynamicList'];
/**
* 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['totalBlacklisted'] = isset($data['totalBlacklisted']) ? $data['totalBlacklisted'] : null;
$this->container['totalSubscribers'] = isset($data['totalSubscribers']) ? $data['totalSubscribers'] : null;
$this->container['folderId'] = isset($data['folderId']) ? $data['folderId'] : null;
$this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null;
$this->container['campaignStats'] = isset($data['campaignStats']) ? $data['campaignStats'] : null;
$this->container['dynamicList'] = isset($data['dynamicList']) ? $data['dynamicList'] : null;
}
/**
* 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";
}
if ($this->container['totalBlacklisted'] === null) {
$invalidProperties[] = "'totalBlacklisted' can't be null";
}
if ($this->container['totalSubscribers'] === null) {
$invalidProperties[] = "'totalSubscribers' can't be null";
}
if ($this->container['folderId'] === null) {
$invalidProperties[] = "'folderId' can't be null";
}
if ($this->container['createdAt'] === null) {
$invalidProperties[] = "'createdAt' can't be null";
}
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return \count($this->listInvalidProperties()) === 0;
}
/**
* Gets id
*
* @return int
*/
public function getId()
{
return $this->container['id'];
}
/**
* Sets id
*
* @param int $id ID of the list
*
* @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 list
*
* @return $this
*/
public function setName($name)
{
$this->container['name'] = $name;
return $this;
}
/**
* Gets totalBlacklisted
*
* @return int
*/
public function getTotalBlacklisted()
{
return $this->container['totalBlacklisted'];
}
/**
* Sets totalBlacklisted
*
* @param int $totalBlacklisted Number of blacklisted contacts in the list
*
* @return $this
*/
public function setTotalBlacklisted($totalBlacklisted)
{
$this->container['totalBlacklisted'] = $totalBlacklisted;
return $this;
}
/**
* Gets totalSubscribers
*
* @return int
*/
public function getTotalSubscribers()
{
return $this->container['totalSubscribers'];
}
/**
* Sets totalSubscribers
*
* @param int $totalSubscribers Number of contacts in the list
*
* @return $this
*/
public function setTotalSubscribers($totalSubscribers)
{
$this->container['totalSubscribers'] = $totalSubscribers;
return $this;
}
/**
* Gets folderId
*
* @return int
*/
public function getFolderId()
{
return $this->container['folderId'];
}
/**
* Sets folderId
*
* @param int $folderId ID of the folder
*
* @return $this
*/
public function setFolderId($folderId)
{
$this->container['folderId'] = $folderId;
return $this;
}
/**
* Gets createdAt
*
* @return \DateTime
*/
public function getCreatedAt()
{
return $this->container['createdAt'];
}
/**
* Sets createdAt
*
* @param \DateTime $createdAt Creation UTC date-time of the list (YYYY-MM-DDTHH:mm:ss.SSSZ)
*
* @return $this
*/
public function setCreatedAt($createdAt)
{
$this->container['createdAt'] = $createdAt;
return $this;
}
/**
* Gets campaignStats
*
* @return \SendinBlue\Client\Model\GetExtendedListCampaignStats[]
*/
public function getCampaignStats()
{
return $this->container['campaignStats'];
}
/**
* Sets campaignStats
*
* @param \SendinBlue\Client\Model\GetExtendedListCampaignStats[] $campaignStats campaignStats
*
* @return $this
*/
public function setCampaignStats($campaignStats)
{
$this->container['campaignStats'] = $campaignStats;
return $this;
}
/**
* Gets dynamicList
*
* @return bool
*/
public function getDynamicList()
{
return $this->container['dynamicList'];
}
/**
* Sets dynamicList
*
* @param bool $dynamicList Status telling if the list is dynamic or not (true=dynamic, false=not dynamic)
*
* @return $this
*/
public function setDynamicList($dynamicList)
{
$this->container['dynamicList'] = $dynamicList;
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));
}
}

View File

@ -0,0 +1,282 @@
<?php
/**
* GetExtendedListCampaignStats
*
* 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;
/**
* GetExtendedListCampaignStats Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetExtendedListCampaignStats implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getExtendedList_campaignStats';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['campaignId' => 'int', 'stats' => 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\GetCampaignStats'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['campaignId' => 'int64', 'stats' => null];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerTypes()
{
return self::$swaggerTypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerFormats()
{
return self::$swaggerFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = ['campaignId' => 'campaignId', 'stats' => 'stats'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['campaignId' => 'setCampaignId', 'stats' => 'setStats'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['campaignId' => 'getCampaignId', 'stats' => 'getStats'];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$swaggerModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['campaignId'] = isset($data['campaignId']) ? $data['campaignId'] : null;
$this->container['stats'] = isset($data['stats']) ? $data['stats'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['campaignId'] === null) {
$invalidProperties[] = "'campaignId' can't be null";
}
if ($this->container['stats'] === null) {
$invalidProperties[] = "'stats' can't be null";
}
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return \count($this->listInvalidProperties()) === 0;
}
/**
* Gets campaignId
*
* @return int
*/
public function getCampaignId()
{
return $this->container['campaignId'];
}
/**
* Sets campaignId
*
* @param int $campaignId ID of the campaign
*
* @return $this
*/
public function setCampaignId($campaignId)
{
$this->container['campaignId'] = $campaignId;
return $this;
}
/**
* Gets stats
*
* @return \SendinBlue\Client\Model\GetCampaignStats
*/
public function getStats()
{
return $this->container['stats'];
}
/**
* Sets stats
*
* @param \SendinBlue\Client\Model\GetCampaignStats $stats stats
*
* @return $this
*/
public function setStats($stats)
{
$this->container['stats'] = $stats;
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));
}
}

View File

@ -0,0 +1,357 @@
<?php
/**
* GetFolder
*
* 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;
/**
* GetFolder Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetFolder implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getFolder';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['id' => 'int', 'name' => 'string', 'totalBlacklisted' => 'int', 'totalSubscribers' => 'int', 'uniqueSubscribers' => 'int'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['id' => 'int64', 'name' => null, 'totalBlacklisted' => 'int64', 'totalSubscribers' => 'int64', 'uniqueSubscribers' => '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', 'name' => 'name', 'totalBlacklisted' => 'totalBlacklisted', 'totalSubscribers' => 'totalSubscribers', 'uniqueSubscribers' => 'uniqueSubscribers'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['id' => 'setId', 'name' => 'setName', 'totalBlacklisted' => 'setTotalBlacklisted', 'totalSubscribers' => 'setTotalSubscribers', 'uniqueSubscribers' => 'setUniqueSubscribers'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['id' => 'getId', 'name' => 'getName', 'totalBlacklisted' => 'getTotalBlacklisted', 'totalSubscribers' => 'getTotalSubscribers', 'uniqueSubscribers' => 'getUniqueSubscribers'];
/**
* 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['totalBlacklisted'] = isset($data['totalBlacklisted']) ? $data['totalBlacklisted'] : null;
$this->container['totalSubscribers'] = isset($data['totalSubscribers']) ? $data['totalSubscribers'] : null;
$this->container['uniqueSubscribers'] = isset($data['uniqueSubscribers']) ? $data['uniqueSubscribers'] : null;
}
/**
* 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";
}
if ($this->container['totalBlacklisted'] === null) {
$invalidProperties[] = "'totalBlacklisted' can't be null";
}
if ($this->container['totalSubscribers'] === null) {
$invalidProperties[] = "'totalSubscribers' can't be null";
}
if ($this->container['uniqueSubscribers'] === null) {
$invalidProperties[] = "'uniqueSubscribers' can't be null";
}
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 folder
*
* @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 folder
*
* @return $this
*/
public function setName($name)
{
$this->container['name'] = $name;
return $this;
}
/**
* Gets totalBlacklisted
*
* @return int
*/
public function getTotalBlacklisted()
{
return $this->container['totalBlacklisted'];
}
/**
* Sets totalBlacklisted
*
* @param int $totalBlacklisted Number of blacklisted contacts in the folder
*
* @return $this
*/
public function setTotalBlacklisted($totalBlacklisted)
{
$this->container['totalBlacklisted'] = $totalBlacklisted;
return $this;
}
/**
* Gets totalSubscribers
*
* @return int
*/
public function getTotalSubscribers()
{
return $this->container['totalSubscribers'];
}
/**
* Sets totalSubscribers
*
* @param int $totalSubscribers Number of contacts in the folder
*
* @return $this
*/
public function setTotalSubscribers($totalSubscribers)
{
$this->container['totalSubscribers'] = $totalSubscribers;
return $this;
}
/**
* Gets uniqueSubscribers
*
* @return int
*/
public function getUniqueSubscribers()
{
return $this->container['uniqueSubscribers'];
}
/**
* Sets uniqueSubscribers
*
* @param int $uniqueSubscribers Number of unique contacts in the folder
*
* @return $this
*/
public function setUniqueSubscribers($uniqueSubscribers)
{
$this->container['uniqueSubscribers'] = $uniqueSubscribers;
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));
}
}

View File

@ -0,0 +1,282 @@
<?php
/**
* GetFolderLists
*
* 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;
/**
* GetFolderLists Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetFolderLists implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getFolderLists';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['lists' => 'object[]', 'count' => 'int'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['lists' => null, 'count' => '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 = ['lists' => 'lists', 'count' => 'count'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['lists' => 'setLists', 'count' => 'setCount'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['lists' => 'getLists', 'count' => 'getCount'];
/**
* 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['lists'] = isset($data['lists']) ? $data['lists'] : null;
$this->container['count'] = isset($data['count']) ? $data['count'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['lists'] === null) {
$invalidProperties[] = "'lists' can't be null";
}
if ($this->container['count'] === null) {
$invalidProperties[] = "'count' can't be null";
}
return $invalidProperties;
}
/**
* 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 lists
*
* @return object[]
*/
public function getLists()
{
return $this->container['lists'];
}
/**
* Sets lists
*
* @param object[] $lists lists
*
* @return $this
*/
public function setLists($lists)
{
$this->container['lists'] = $lists;
return $this;
}
/**
* Gets count
*
* @return int
*/
public function getCount()
{
return $this->container['count'];
}
/**
* Sets count
*
* @param int $count Number of lists in the folder
*
* @return $this
*/
public function setCount($count)
{
$this->container['count'] = $count;
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));
}
}

View File

@ -0,0 +1,276 @@
<?php
/**
* GetFolders
*
* 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;
/**
* GetFolders Class Doc Comment
*
* @category Class
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GetFolders implements \WPMailSMTP\Vendor\SendinBlue\Client\Model\ModelInterface, \ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'getFolders';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = ['folders' => 'object[]', 'count' => 'int'];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = ['folders' => null, 'count' => '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 = ['folders' => 'folders', 'count' => 'count'];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = ['folders' => 'setFolders', 'count' => 'setCount'];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = ['folders' => 'getFolders', 'count' => 'getCount'];
/**
* 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['folders'] = isset($data['folders']) ? $data['folders'] : null;
$this->container['count'] = isset($data['count']) ? $data['count'] : 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 folders
*
* @return object[]
*/
public function getFolders()
{
return $this->container['folders'];
}
/**
* Sets folders
*
* @param object[] $folders folders
*
* @return $this
*/
public function setFolders($folders)
{
$this->container['folders'] = $folders;
return $this;
}
/**
* Gets count
*
* @return int
*/
public function getCount()
{
return $this->container['count'];
}
/**
* Sets count
*
* @param int $count Number of folders available in your account
*
* @return $this
*/
public function setCount($count)
{
$this->container['count'] = $count;
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));
}
}

Some files were not shown because too many files have changed in this diff Show More