Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/Model/CreateSmsCampaign.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **string** | Name of the campaign |
**sender** | **string** | Name of the sender. The number of characters is limited to 11 |
**sender** | **string** | Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** |
**content** | **string** | 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 |
**recipients** | [**\SendinBlue\Client\Model\CreateSmsCampaignRecipients**](CreateSmsCampaignRecipients.md) | | [optional]
**scheduledAt** | [**\DateTime**] | 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. | [optional]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**eventTime** | [**\DateTime**] | UTC date-time of the event |
**ip** | **string** | IP from which the user has been unsubscribed |
**ip** | **string** | IP from which the user has been unsubscribed | [optional]

[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**campaignId** | **int** | ID of the campaign which generated the event |
**eventTime** | [**\DateTime**] | UTC date-time of the event |
**ip** | **string** | IP from which the user has unsubscribed |
**ip** | **string** | IP from which the user has unsubscribed | [optional]

[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)

Expand Down
6 changes: 1 addition & 5 deletions docs/Model/SendReportEmail.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**subject** | **string** | Subject of the email message |
**to** | **string[]** | Email addresses of the recipients |
**contentType** | **string** | Type of the message body | [optional] [default to 'html']
**bcc** | **string[]** | Email addresses of the recipients in bcc | [optional]
**cc** | **string[]** | Email addresses of the recipients in cc | [optional]
**body** | **string** | Body of the email message |
**body** | **string** | Custom text message to be presented in the report email. |

[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)

Expand Down
2 changes: 1 addition & 1 deletion docs/Model/SendTransacSms.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**sender** | **string** | Name of the sender. Only alphanumeric characters. No more than 11 characters |
**sender** | **string** | Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** |
**recipient** | **string** | Mobile number to send SMS with the country code |
**content** | **string** | Content of the message. If more than 160 characters long, will be sent as multiple text messages |
**type** | **string** | Type of the SMS. Marketing SMS messages are those sent typically with marketing content. Transactional SMS messages are sent to individuals and are triggered in response to some action, such as a sign-up, purchase, etc. | [optional] [default to 'transactional']
Expand Down
2 changes: 1 addition & 1 deletion docs/Model/UpdateSmsCampaign.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **string** | Name of the campaign | [optional]
**sender** | **string** | Name of the sender. The number of characters is limited to 11 | [optional]
**sender** | **string** | Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** | [optional]
**content** | **string** | 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 | [optional]
**recipients** | [**\SendinBlue\Client\Model\CreateSmsCampaignRecipients**](CreateSmsCampaignRecipients.md) | | [optional]
**scheduledAt** | [**\DateTime**] | 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. | [optional]
Expand Down
10 changes: 5 additions & 5 deletions lib/Model/CreateSmsCampaign.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ public function listInvalidProperties()
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 ((mb_strlen($this->container['sender']) > 15)) {
$invalidProperties[] = "invalid value for 'sender', the character length must be smaller than or equal to 15.";
}

if ($this->container['content'] === null) {
Expand Down Expand Up @@ -278,14 +278,14 @@ public function getSender()
/**
* Sets sender
*
* @param string $sender Name of the sender. The number of characters is limited to 11
* @param string $sender Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters**
*
* @return $this
*/
public function setSender($sender)
{
if ((mb_strlen($sender) > 11)) {
throw new \InvalidArgumentException('invalid length for $sender when calling CreateSmsCampaign., must be smaller than or equal to 11.');
if ((mb_strlen($sender) > 15)) {
throw new \InvalidArgumentException('invalid length for $sender when calling CreateSmsCampaign., must be smaller than or equal to 15.');
}

$this->container['sender'] = $sender;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,6 @@ public function listInvalidProperties()
if ($this->container['eventTime'] === null) {
$invalidProperties[] = "'eventTime' can't be null";
}
if ($this->container['ip'] === null) {
$invalidProperties[] = "'ip' can't be null";
}
return $invalidProperties;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,6 @@ public function listInvalidProperties()
if ($this->container['eventTime'] === null) {
$invalidProperties[] = "'eventTime' can't be null";
}
if ($this->container['ip'] === null) {
$invalidProperties[] = "'ip' can't be null";
}
return $invalidProperties;
}

Expand Down
159 changes: 2 additions & 157 deletions lib/Model/SendReportEmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* SendReportEmail Class Doc Comment
*
* @category Class
* @description Email sending credentials including subject, body, to, cc etc.
* @description Custom attributes for the report email.
* @package SendinBlue\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
Expand All @@ -58,11 +58,7 @@ class SendReportEmail implements ModelInterface, ArrayAccess
* @var string[]
*/
protected static $swaggerTypes = [
'subject' => 'string',
'to' => 'string[]',
'contentType' => 'string',
'bcc' => 'string[]',
'cc' => 'string[]',
'body' => 'string'
];

Expand All @@ -72,11 +68,7 @@ class SendReportEmail implements ModelInterface, ArrayAccess
* @var string[]
*/
protected static $swaggerFormats = [
'subject' => null,
'to' => 'email',
'contentType' => null,
'bcc' => 'email',
'cc' => 'email',
'body' => null
];

Expand Down Expand Up @@ -107,11 +99,7 @@ public static function swaggerFormats()
* @var string[]
*/
protected static $attributeMap = [
'subject' => 'subject',
'to' => 'to',
'contentType' => 'contentType',
'bcc' => 'bcc',
'cc' => 'cc',
'body' => 'body'
];

Expand All @@ -121,11 +109,7 @@ public static function swaggerFormats()
* @var string[]
*/
protected static $setters = [
'subject' => 'setSubject',
'to' => 'setTo',
'contentType' => 'setContentType',
'bcc' => 'setBcc',
'cc' => 'setCc',
'body' => 'setBody'
];

Expand All @@ -135,11 +119,7 @@ public static function swaggerFormats()
* @var string[]
*/
protected static $getters = [
'subject' => 'getSubject',
'to' => 'getTo',
'contentType' => 'getContentType',
'bcc' => 'getBcc',
'cc' => 'getCc',
'body' => 'getBody'
];

Expand Down Expand Up @@ -184,24 +164,9 @@ public function getModelName()
return self::$swaggerModelName;
}

const CONTENT_TYPE_TEXT = 'text';
const CONTENT_TYPE_HTML = 'html';



/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getContentTypeAllowableValues()
{
return [
self::CONTENT_TYPE_TEXT,
self::CONTENT_TYPE_HTML,
];
}


/**
* Associative array for storing property values
Expand All @@ -218,11 +183,7 @@ public function getContentTypeAllowableValues()
*/
public function __construct(array $data = null)
{
$this->container['subject'] = isset($data['subject']) ? $data['subject'] : null;
$this->container['to'] = isset($data['to']) ? $data['to'] : null;
$this->container['contentType'] = isset($data['contentType']) ? $data['contentType'] : 'html';
$this->container['bcc'] = isset($data['bcc']) ? $data['bcc'] : null;
$this->container['cc'] = isset($data['cc']) ? $data['cc'] : null;
$this->container['body'] = isset($data['body']) ? $data['body'] : null;
}

Expand All @@ -235,20 +196,9 @@ public function listInvalidProperties()
{
$invalidProperties = [];

if ($this->container['subject'] === null) {
$invalidProperties[] = "'subject' can't be null";
}
if ($this->container['to'] === null) {
$invalidProperties[] = "'to' can't be null";
}
$allowedValues = $this->getContentTypeAllowableValues();
if (!is_null($this->container['contentType']) && !in_array($this->container['contentType'], $allowedValues, true)) {
$invalidProperties[] = sprintf(
"invalid value for 'contentType', must be one of '%s'",
implode("', '", $allowedValues)
);
}

if ($this->container['body'] === null) {
$invalidProperties[] = "'body' can't be null";
}
Expand All @@ -267,30 +217,6 @@ public function valid()
}


/**
* Gets subject
*
* @return string
*/
public function getSubject()
{
return $this->container['subject'];
}

/**
* Sets subject
*
* @param string $subject Subject of the email message
*
* @return $this
*/
public function setSubject($subject)
{
$this->container['subject'] = $subject;

return $this;
}

/**
* Gets to
*
Expand All @@ -315,87 +241,6 @@ public function setTo($to)
return $this;
}

/**
* Gets contentType
*
* @return string
*/
public function getContentType()
{
return $this->container['contentType'];
}

/**
* Sets contentType
*
* @param string $contentType Type of the message body
*
* @return $this
*/
public function setContentType($contentType)
{
$allowedValues = $this->getContentTypeAllowableValues();
if (!is_null($contentType) && !in_array($contentType, $allowedValues, true)) {
throw new \InvalidArgumentException(
sprintf(
"Invalid value for 'contentType', must be one of '%s'",
implode("', '", $allowedValues)
)
);
}
$this->container['contentType'] = $contentType;

return $this;
}

/**
* Gets bcc
*
* @return string[]
*/
public function getBcc()
{
return $this->container['bcc'];
}

/**
* Sets bcc
*
* @param string[] $bcc Email addresses of the recipients in bcc
*
* @return $this
*/
public function setBcc($bcc)
{
$this->container['bcc'] = $bcc;

return $this;
}

/**
* Gets cc
*
* @return string[]
*/
public function getCc()
{
return $this->container['cc'];
}

/**
* Sets cc
*
* @param string[] $cc Email addresses of the recipients in cc
*
* @return $this
*/
public function setCc($cc)
{
$this->container['cc'] = $cc;

return $this;
}

/**
* Gets body
*
Expand All @@ -409,7 +254,7 @@ public function getBody()
/**
* Sets body
*
* @param string $body Body of the email message
* @param string $body Custom text message to be presented in the report email.
*
* @return $this
*/
Expand Down
10 changes: 5 additions & 5 deletions lib/Model/SendTransacSms.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ public function listInvalidProperties()
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 ((mb_strlen($this->container['sender']) > 15)) {
$invalidProperties[] = "invalid value for 'sender', the character length must be smaller than or equal to 15.";
}

if ($this->container['recipient'] === null) {
Expand Down Expand Up @@ -283,14 +283,14 @@ public function getSender()
/**
* Sets sender
*
* @param string $sender Name of the sender. Only alphanumeric characters. No more than 11 characters
* @param string $sender Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters**
*
* @return $this
*/
public function setSender($sender)
{
if ((mb_strlen($sender) > 11)) {
throw new \InvalidArgumentException('invalid length for $sender when calling SendTransacSms., must be smaller than or equal to 11.');
if ((mb_strlen($sender) > 15)) {
throw new \InvalidArgumentException('invalid length for $sender when calling SendTransacSms., must be smaller than or equal to 15.');
}

$this->container['sender'] = $sender;
Expand Down
Loading