Skip to content

Commit 642949d

Browse files
committed
Merge pull request #54 from sendinblue/feature_new-updates
sendTransacSms content length validation removed
2 parents 82231a0 + 01a2b07 commit 642949d

File tree

4 files changed

+35
-54
lines changed

4 files changed

+35
-54
lines changed

README.md

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,15 @@ PHP 5.6 and later
1919
## Installation & Usage
2020
### Composer
2121

22-
To install the bindings via [Composer](http://getcomposer.org/), add the following to `composer.json`:
22+
To install the bindings via [Composer](http://getcomposer.org/):
2323

2424
```
25-
{
26-
"repositories": [
27-
{
28-
"type": "git",
29-
"url": "https://github.com/sendinblue/APIv3-php-library.git"
30-
}
31-
],
32-
"require": {
33-
"sendinblue/api-v3-sdk": "*@dev"
34-
}
35-
}
25+
composer require sendinblue/api-v3-sdk "^6.0.0"
3626
```
3727

38-
Then run `composer install`
28+
Further do:
29+
* run ``composer install`` to get these dependencies added to your vendor directory
30+
* add the autoloader to your application with this line: ``require("vendor/autoload.php")``
3931

4032
### Manual Installation
4133

composer.lock

Lines changed: 28 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/Model/SendTransacSms.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**sender** | **string** | Name of the sender. Only alphanumeric characters. No more than 11 characters |
77
**recipient** | **string** | Mobile number to send SMS with the country code |
8-
**content** | **string** | Content of the message. If more than 160 characters long, multiple text messages will be sent |
8+
**content** | **string** | Content of the message. If more than 160 characters long, will be sent as multiple text messages |
99
**type** | **string** | Type of the SMS | [optional] [default to 'transactional']
1010
**tag** | **string** | Tag of the message | [optional]
1111
**webUrl** | **string** | Webhook to call for each event triggered by the message (delivered etc.) | [optional]

lib/Model/SendTransacSms.php

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,6 @@ public function listInvalidProperties()
247247
if ($this->container['content'] === null) {
248248
$invalidProperties[] = "'content' can't be null";
249249
}
250-
if ((strlen($this->container['content']) > 160)) {
251-
$invalidProperties[] = "invalid value for 'content', the character length must be smaller than or equal to 160.";
252-
}
253-
254250
$allowedValues = $this->getTypeAllowableValues();
255251
if (!in_array($this->container['type'], $allowedValues)) {
256252
$invalidProperties[] = sprintf(
@@ -283,9 +279,6 @@ public function valid()
283279
if ($this->container['content'] === null) {
284280
return false;
285281
}
286-
if (strlen($this->container['content']) > 160) {
287-
return false;
288-
}
289282
$allowedValues = $this->getTypeAllowableValues();
290283
if (!in_array($this->container['type'], $allowedValues)) {
291284
return false;
@@ -359,16 +352,12 @@ public function getContent()
359352
/**
360353
* Sets content
361354
*
362-
* @param string $content Content of the message. If more than 160 characters long, multiple text messages will be sent
355+
* @param string $content Content of the message. If more than 160 characters long, will be sent as multiple text messages
363356
*
364357
* @return $this
365358
*/
366359
public function setContent($content)
367360
{
368-
if ((strlen($content) > 160)) {
369-
throw new \InvalidArgumentException('invalid length for $content when calling SendTransacSms., must be smaller than or equal to 160.');
370-
}
371-
372361
$this->container['content'] = $content;
373362

374363
return $this;

0 commit comments

Comments
 (0)