diff --git a/README.md b/README.md index e9ca2c0..52f1e76 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Messente API Library - Messente API version: 2.0.0 -- PHP artifact version: 2.0.0 +- PHP artifact version: 2.0.1 [Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber, WhatsApp and Telegram messages. * Manage contacts and groups. * Fetch detailed info about phone numbers. * Blacklist phone numbers to make sure you're not sending any unwanted messages. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. diff --git a/composer.json b/composer.json index 7b98059..0488b83 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "messente/messente-api-php", - "version": "2.0.0", + "version": "2.0.1", "description": "[Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber, WhatsApp and Telegram messages. * Manage contacts and groups. * Fetch detailed info about phone numbers. * Blacklist phone numbers to make sure you're not sending any unwanted messages. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world.", "keywords": ["viber", "telegram", "sms", "whatsapp", "phonebook", "openapitools", "openapi-generator", diff --git a/docs/Model/NumbersToInvestigate.md b/docs/Model/NumbersToInvestigate.md index e1d6cca..705faae 100644 --- a/docs/Model/NumbersToInvestigate.md +++ b/docs/Model/NumbersToInvestigate.md @@ -4,6 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**numbers** | **string[]** | Array of phone numbers | +**numbers** | **string[]** | A list of phone numbers. Max 10 numbers per request | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SMS.md b/docs/Model/SMS.md index f0d4c91..3558995 100644 --- a/docs/Model/SMS.md +++ b/docs/Model/SMS.md @@ -6,7 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **text** | **string** | Text content of the SMS | **sender** | **string** | Phone number or alphanumeric sender name | [optional] -**validity** | **int** | After how many minutes this channel is considered as failed and the next channel is attempted | [optional] +**validity** | **int** | After how many minutes this channel is considered as failed and the next channel is attempted. Only one of \"ttl\" and \"validity\" can be used. | [optional] +**ttl** | **int** | After how many seconds this channel is considered as failed and the next channel is attempted. Only one of \"ttl\" and \"validity\" can be used. | [optional] **autoconvert** | **string** | Defines how non-GSM characters will be treated: - \"on\" Use replacement settings from the account's [API Auto Replace settings page](https://dashboard.messente.com/api-settings/auto-replace) (default) - \"full\" All non GSM 03.38 characters will be replaced with suitable alternatives - \"off\" Message content is not modified in any way | [optional] **udh** | **string** | hex-encoded string containing SMS UDH | [optional] **channel** | **string** | The channel used to deliver the message | [optional] [default to 'sms'] diff --git a/docs/Model/Viber.md b/docs/Model/Viber.md index 688a035..b771b22 100644 --- a/docs/Model/Viber.md +++ b/docs/Model/Viber.md @@ -5,7 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **sender** | **string** | Phone number or alphanumeric sender name | [optional] -**validity** | **int** | After how many minutes this channel is considered as failed and the next channel is attempted | [optional] +**validity** | **int** | After how many minutes this channel is considered as failed and the next channel is attempted. Only one of \"ttl\" and \"validity\" can be used. | [optional] +**ttl** | **int** | After how many seconds this channel is considered as failed and the next channel is attempted. Only one of \"ttl\" and \"validity\" can be used. | [optional] **text** | **string** | Plaintext content for Viber | [optional] **imageUrl** | **string** | URL for the embedded image Valid combinations: 1) image_url, 2) text, image_url, button_url, button_text | [optional] **buttonUrl** | **string** | URL of the button, must be specified along with ''text'', ''button_text'' and ''image_url'' (optional) | [optional] diff --git a/docs/Model/WhatsApp.md b/docs/Model/WhatsApp.md index 6ce50dd..95aab88 100644 --- a/docs/Model/WhatsApp.md +++ b/docs/Model/WhatsApp.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **sender** | **string** | Phone number or alphanumeric sender name | [optional] **validity** | **int** | After how many minutes this channel is considered as failed and the next channel is attempted | [optional] +**ttl** | **int** | After how many seconds this channel is considered as failed and the next channel is attempted. Only one of \"ttl\" and \"validity\" can be used. | [optional] **text** | [**\Messente\Api\Model\WhatsAppText**](WhatsAppText.md) | | [optional] **image** | [**\Messente\Api\Model\WhatsAppImage**](WhatsAppImage.md) | | [optional] **document** | [**\Messente\Api\Model\WhatsAppDocument**](WhatsAppDocument.md) | | [optional] diff --git a/lib/Configuration.php b/lib/Configuration.php index c7afb2d..e8324a5 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -91,7 +91,7 @@ class Configuration * * @var string */ - protected $userAgent = 'OpenAPI-Generator/2.0.0/PHP'; + protected $userAgent = 'OpenAPI-Generator/2.0.1/PHP'; /** * Debug switch (default set to false) @@ -400,7 +400,7 @@ public static function toDebugReport() $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; $report .= ' The version of the OpenAPI document: 2.0.0' . PHP_EOL; - $report .= ' SDK Package Version: 2.0.0' . PHP_EOL; + $report .= ' SDK Package Version: 2.0.1' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/lib/Model/NumbersToInvestigate.php b/lib/Model/NumbersToInvestigate.php index f3bff0f..5f5b95c 100644 --- a/lib/Model/NumbersToInvestigate.php +++ b/lib/Model/NumbersToInvestigate.php @@ -231,7 +231,7 @@ public function getNumbers() /** * Sets numbers * - * @param string[] $numbers Array of phone numbers + * @param string[] $numbers A list of phone numbers. Max 10 numbers per request * * @return self */ diff --git a/lib/Model/SMS.php b/lib/Model/SMS.php index 7f3c04d..44acc1c 100644 --- a/lib/Model/SMS.php +++ b/lib/Model/SMS.php @@ -64,6 +64,7 @@ class SMS implements ModelInterface, ArrayAccess, \JsonSerializable 'text' => 'string', 'sender' => 'string', 'validity' => 'int', + 'ttl' => 'int', 'autoconvert' => 'string', 'udh' => 'string', 'channel' => 'string' @@ -80,6 +81,7 @@ class SMS implements ModelInterface, ArrayAccess, \JsonSerializable 'text' => null, 'sender' => null, 'validity' => null, + 'ttl' => null, 'autoconvert' => null, 'udh' => null, 'channel' => null @@ -115,6 +117,7 @@ public static function openAPIFormats() 'text' => 'text', 'sender' => 'sender', 'validity' => 'validity', + 'ttl' => 'ttl', 'autoconvert' => 'autoconvert', 'udh' => 'udh', 'channel' => 'channel' @@ -129,6 +132,7 @@ public static function openAPIFormats() 'text' => 'setText', 'sender' => 'setSender', 'validity' => 'setValidity', + 'ttl' => 'setTtl', 'autoconvert' => 'setAutoconvert', 'udh' => 'setUdh', 'channel' => 'setChannel' @@ -143,6 +147,7 @@ public static function openAPIFormats() 'text' => 'getText', 'sender' => 'getSender', 'validity' => 'getValidity', + 'ttl' => 'getTtl', 'autoconvert' => 'getAutoconvert', 'udh' => 'getUdh', 'channel' => 'getChannel' @@ -238,6 +243,7 @@ public function __construct(array $data = null) $this->container['text'] = $data['text'] ?? null; $this->container['sender'] = $data['sender'] ?? null; $this->container['validity'] = $data['validity'] ?? null; + $this->container['ttl'] = $data['ttl'] ?? null; $this->container['autoconvert'] = $data['autoconvert'] ?? null; $this->container['udh'] = $data['udh'] ?? null; $this->container['channel'] = $data['channel'] ?? 'sms'; @@ -349,7 +355,7 @@ public function getValidity() /** * Sets validity * - * @param int|null $validity After how many minutes this channel is considered as failed and the next channel is attempted + * @param int|null $validity After how many minutes this channel is considered as failed and the next channel is attempted. Only one of \"ttl\" and \"validity\" can be used. * * @return self */ @@ -360,6 +366,30 @@ public function setValidity($validity) return $this; } + /** + * Gets ttl + * + * @return int|null + */ + public function getTtl() + { + return $this->container['ttl']; + } + + /** + * Sets ttl + * + * @param int|null $ttl After how many seconds this channel is considered as failed and the next channel is attempted. Only one of \"ttl\" and \"validity\" can be used. + * + * @return self + */ + public function setTtl($ttl) + { + $this->container['ttl'] = $ttl; + + return $this; + } + /** * Gets autoconvert * diff --git a/lib/Model/Viber.php b/lib/Model/Viber.php index e4ac2d9..0447d57 100644 --- a/lib/Model/Viber.php +++ b/lib/Model/Viber.php @@ -63,6 +63,7 @@ class Viber implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'sender' => 'string', 'validity' => 'int', + 'ttl' => 'int', 'text' => 'string', 'imageUrl' => 'string', 'buttonUrl' => 'string', @@ -80,6 +81,7 @@ class Viber implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPIFormats = [ 'sender' => null, 'validity' => null, + 'ttl' => null, 'text' => null, 'imageUrl' => null, 'buttonUrl' => null, @@ -116,6 +118,7 @@ public static function openAPIFormats() protected static $attributeMap = [ 'sender' => 'sender', 'validity' => 'validity', + 'ttl' => 'ttl', 'text' => 'text', 'imageUrl' => 'image_url', 'buttonUrl' => 'button_url', @@ -131,6 +134,7 @@ public static function openAPIFormats() protected static $setters = [ 'sender' => 'setSender', 'validity' => 'setValidity', + 'ttl' => 'setTtl', 'text' => 'setText', 'imageUrl' => 'setImageUrl', 'buttonUrl' => 'setButtonUrl', @@ -146,6 +150,7 @@ public static function openAPIFormats() protected static $getters = [ 'sender' => 'getSender', 'validity' => 'getValidity', + 'ttl' => 'getTtl', 'text' => 'getText', 'imageUrl' => 'getImageUrl', 'buttonUrl' => 'getButtonUrl', @@ -225,6 +230,7 @@ public function __construct(array $data = null) { $this->container['sender'] = $data['sender'] ?? null; $this->container['validity'] = $data['validity'] ?? null; + $this->container['ttl'] = $data['ttl'] ?? null; $this->container['text'] = $data['text'] ?? null; $this->container['imageUrl'] = $data['imageUrl'] ?? null; $this->container['buttonUrl'] = $data['buttonUrl'] ?? null; @@ -302,7 +308,7 @@ public function getValidity() /** * Sets validity * - * @param int|null $validity After how many minutes this channel is considered as failed and the next channel is attempted + * @param int|null $validity After how many minutes this channel is considered as failed and the next channel is attempted. Only one of \"ttl\" and \"validity\" can be used. * * @return self */ @@ -313,6 +319,30 @@ public function setValidity($validity) return $this; } + /** + * Gets ttl + * + * @return int|null + */ + public function getTtl() + { + return $this->container['ttl']; + } + + /** + * Sets ttl + * + * @param int|null $ttl After how many seconds this channel is considered as failed and the next channel is attempted. Only one of \"ttl\" and \"validity\" can be used. + * + * @return self + */ + public function setTtl($ttl) + { + $this->container['ttl'] = $ttl; + + return $this; + } + /** * Gets text * diff --git a/lib/Model/WhatsApp.php b/lib/Model/WhatsApp.php index aa14c56..d55da7a 100644 --- a/lib/Model/WhatsApp.php +++ b/lib/Model/WhatsApp.php @@ -63,6 +63,7 @@ class WhatsApp implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'sender' => 'string', 'validity' => 'int', + 'ttl' => 'int', 'text' => '\Messente\Api\Model\WhatsAppText', 'image' => '\Messente\Api\Model\WhatsAppImage', 'document' => '\Messente\Api\Model\WhatsAppDocument', @@ -80,6 +81,7 @@ class WhatsApp implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPIFormats = [ 'sender' => null, 'validity' => null, + 'ttl' => null, 'text' => null, 'image' => null, 'document' => null, @@ -116,6 +118,7 @@ public static function openAPIFormats() protected static $attributeMap = [ 'sender' => 'sender', 'validity' => 'validity', + 'ttl' => 'ttl', 'text' => 'text', 'image' => 'image', 'document' => 'document', @@ -131,6 +134,7 @@ public static function openAPIFormats() protected static $setters = [ 'sender' => 'setSender', 'validity' => 'setValidity', + 'ttl' => 'setTtl', 'text' => 'setText', 'image' => 'setImage', 'document' => 'setDocument', @@ -146,6 +150,7 @@ public static function openAPIFormats() protected static $getters = [ 'sender' => 'getSender', 'validity' => 'getValidity', + 'ttl' => 'getTtl', 'text' => 'getText', 'image' => 'getImage', 'document' => 'getDocument', @@ -225,6 +230,7 @@ public function __construct(array $data = null) { $this->container['sender'] = $data['sender'] ?? null; $this->container['validity'] = $data['validity'] ?? null; + $this->container['ttl'] = $data['ttl'] ?? null; $this->container['text'] = $data['text'] ?? null; $this->container['image'] = $data['image'] ?? null; $this->container['document'] = $data['document'] ?? null; @@ -313,6 +319,30 @@ public function setValidity($validity) return $this; } + /** + * Gets ttl + * + * @return int|null + */ + public function getTtl() + { + return $this->container['ttl']; + } + + /** + * Sets ttl + * + * @param int|null $ttl After how many seconds this channel is considered as failed and the next channel is attempted. Only one of \"ttl\" and \"validity\" can be used. + * + * @return self + */ + public function setTtl($ttl) + { + $this->container['ttl'] = $ttl; + + return $this; + } + /** * Gets text * diff --git a/test/Model/SMSTest.php b/test/Model/SMSTest.php index c8cede3..3ab9316 100644 --- a/test/Model/SMSTest.php +++ b/test/Model/SMSTest.php @@ -107,6 +107,15 @@ public function testPropertyValidity() $this->markTestIncomplete('Not implemented'); } + /** + * Test attribute "ttl" + */ + public function testPropertyTtl() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + /** * Test attribute "autoconvert" */ diff --git a/test/Model/ViberTest.php b/test/Model/ViberTest.php index bc8daca..f15e95e 100644 --- a/test/Model/ViberTest.php +++ b/test/Model/ViberTest.php @@ -98,6 +98,15 @@ public function testPropertyValidity() $this->markTestIncomplete('Not implemented'); } + /** + * Test attribute "ttl" + */ + public function testPropertyTtl() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + /** * Test attribute "text" */ diff --git a/test/Model/WhatsAppTest.php b/test/Model/WhatsAppTest.php index 462de55..115ec5c 100644 --- a/test/Model/WhatsAppTest.php +++ b/test/Model/WhatsAppTest.php @@ -98,6 +98,15 @@ public function testPropertyValidity() $this->markTestIncomplete('Not implemented'); } + /** + * Test attribute "ttl" + */ + public function testPropertyTtl() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + /** * Test attribute "text" */