Skip to content

Commit

Permalink
Merge pull request #18 from messente/travis
Browse files Browse the repository at this point in the history
2.0.1
  • Loading branch information
krystian-wojakiewicz authored Jan 19, 2023
2 parents 178699a + efaf2c9 commit 978a33e
Show file tree
Hide file tree
Showing 14 changed files with 130 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion docs/Model/NumbersToInvestigate.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
3 changes: 2 additions & 1 deletion docs/Model/SMS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
3 changes: 2 additions & 1 deletion docs/Model/Viber.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
1 change: 1 addition & 0 deletions docs/Model/WhatsApp.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions lib/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion lib/Model/NumbersToInvestigate.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
32 changes: 31 additions & 1 deletion lib/Model/SMS.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class SMS implements ModelInterface, ArrayAccess, \JsonSerializable
'text' => 'string',
'sender' => 'string',
'validity' => 'int',
'ttl' => 'int',
'autoconvert' => 'string',
'udh' => 'string',
'channel' => 'string'
Expand All @@ -80,6 +81,7 @@ class SMS implements ModelInterface, ArrayAccess, \JsonSerializable
'text' => null,
'sender' => null,
'validity' => null,
'ttl' => null,
'autoconvert' => null,
'udh' => null,
'channel' => null
Expand Down Expand Up @@ -115,6 +117,7 @@ public static function openAPIFormats()
'text' => 'text',
'sender' => 'sender',
'validity' => 'validity',
'ttl' => 'ttl',
'autoconvert' => 'autoconvert',
'udh' => 'udh',
'channel' => 'channel'
Expand All @@ -129,6 +132,7 @@ public static function openAPIFormats()
'text' => 'setText',
'sender' => 'setSender',
'validity' => 'setValidity',
'ttl' => 'setTtl',
'autoconvert' => 'setAutoconvert',
'udh' => 'setUdh',
'channel' => 'setChannel'
Expand All @@ -143,6 +147,7 @@ public static function openAPIFormats()
'text' => 'getText',
'sender' => 'getSender',
'validity' => 'getValidity',
'ttl' => 'getTtl',
'autoconvert' => 'getAutoconvert',
'udh' => 'getUdh',
'channel' => 'getChannel'
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -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
*/
Expand All @@ -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
*
Expand Down
32 changes: 31 additions & 1 deletion lib/Model/Viber.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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,
Expand Down Expand Up @@ -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',
Expand All @@ -131,6 +134,7 @@ public static function openAPIFormats()
protected static $setters = [
'sender' => 'setSender',
'validity' => 'setValidity',
'ttl' => 'setTtl',
'text' => 'setText',
'imageUrl' => 'setImageUrl',
'buttonUrl' => 'setButtonUrl',
Expand All @@ -146,6 +150,7 @@ public static function openAPIFormats()
protected static $getters = [
'sender' => 'getSender',
'validity' => 'getValidity',
'ttl' => 'getTtl',
'text' => 'getText',
'imageUrl' => 'getImageUrl',
'buttonUrl' => 'getButtonUrl',
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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
*/
Expand All @@ -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
*
Expand Down
30 changes: 30 additions & 0 deletions lib/Model/WhatsApp.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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,
Expand Down Expand Up @@ -116,6 +118,7 @@ public static function openAPIFormats()
protected static $attributeMap = [
'sender' => 'sender',
'validity' => 'validity',
'ttl' => 'ttl',
'text' => 'text',
'image' => 'image',
'document' => 'document',
Expand All @@ -131,6 +134,7 @@ public static function openAPIFormats()
protected static $setters = [
'sender' => 'setSender',
'validity' => 'setValidity',
'ttl' => 'setTtl',
'text' => 'setText',
'image' => 'setImage',
'document' => 'setDocument',
Expand All @@ -146,6 +150,7 @@ public static function openAPIFormats()
protected static $getters = [
'sender' => 'getSender',
'validity' => 'getValidity',
'ttl' => 'getTtl',
'text' => 'getText',
'image' => 'getImage',
'document' => 'getDocument',
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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
*
Expand Down
9 changes: 9 additions & 0 deletions test/Model/SMSTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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"
*/
Expand Down
9 changes: 9 additions & 0 deletions test/Model/ViberTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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"
*/
Expand Down
9 changes: 9 additions & 0 deletions test/Model/WhatsAppTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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"
*/
Expand Down

0 comments on commit 978a33e

Please sign in to comment.